Backend Development Challenges

Challenges

Week 1 🟩

Build a Basic Email Client (GMAIL HTML)

Pre-requisites

Before you begin, ensure you have the following:

  • Basic Understanding of HTML: Familiarity with HTML tags and structure.

  • Willingness to Learn: A desire to understand how to build web interfaces using HTML.

Problem Description

Imagine you're a freelance web developer looking to enhance your portfolio. You want to showcase your ability to structure web pages effectively by creating a simple email client interface. Think of it as a basic, stripped-down version of Gmail. This low-fidelity prototype will demonstrate your skills in HTML and provide a visual example of your capability to potential recruiters and clients. An email client interface is a perfect project because it involves a variety of HTML elements and structures, illustrating your comprehensive understanding of web development fundamentals.

Problem

Your challenge is to build the basic interface of an email client using only HTML. This will include various sections to mimic the layout of Gmail. Follow these steps to create your project:

  1. Structure:

    • Use semantic HTML tags to define the layout.

    • Start with the usual declarations (<!DOCTYPE html>, <html>, <head>, <body>).

    • Create a header section (<header>) containing a logo (use an <img> tag) and a search bar using an <input> element.

    • Employ a <nav> element for the sidebar navigation. Include links for Inbox, Sent, Drafts, etc. (use anchor tags <a>).

    • Divide the main area into two sections:

      • A left-hand pane (<section>) representing the email list. Use another <section> or <ul> within it to display individual emails. Each email item can be a <div> with elements for sender name (<span>), subject (<strong>), and a snippet of the message (<p>). Use a class attribute to visually differentiate unread emails.

      • A right-hand pane (<section>) to display a placeholder for the selected email content. This can be another <div> containing placeholders for sender information, subject line, and the email body (<p>).

  2. Basic Styling (Optional):

    • You can add minimal CSS inline styles within the HTML tags (e.g., style="width: 200px;") to differentiate the layout sections and make it visually appealing (font sizes, borders). However, the focus should be on using semantic tags to achieve the basic structure.

Submission Guidelines

  1. Code Submission:

    • Submit your HTML code for the email client interface.

    • Ensure your code is well-structured and uses semantic HTML tags.

  2. Screenshot:

    • You should include a screenshot of your code running in a web browser for better visualization, but it’s not mandatory.

Example Structure

Here is a basic example to guide you:

Learning Resources

Week 2 🟩

Building Blocks of Your Expertise

This challenge is designed for aspiring backend developers to solidify their understanding of fundamental programming concepts before diving into frameworks. Let's practice core functionalities using various backend languages (choose your preferred language or try them all!).


Pre-requisites

To participate in this challenge, you should have:

  • Basic understanding of programming concepts such as variables, data types, control structures, and functions.

  • Familiarity with at least one backend programming language (e.g., Python, Java, C#, JavaScript).

  • Access to a development environment (e.g., IDE, text editor, and compiler/interpreter for your chosen language).


Problem Description

Imagine you're applying for a backend developer role at a tech startup. The hiring manager wants to see if you can handle real-world backend tasks without relying on frameworks. These tasks include manipulating data, creating reusable functions, and structuring your code effectively using object-oriented principles. Completing this challenge will not only demonstrate your coding skills but also your problem-solving abilities and understanding of backend development fundamentals.

For instance, a recruiter reviewing your application might come across your submission for this challenge. Impressed by your clear, efficient code and thoughtful problem-solving approach, they see potential in your ability to handle complex backend tasks and integrate well with their development team. This significantly increases your chances of landing an interview.


Level 1: Building Blocks (Easy)

Variables and Data Types:

  1. Declare and initialize variables of different data types (e.g., integer, string, boolean).

  2. Perform basic arithmetic operations and string manipulation.

Conditional Statements (if-else):

  1. Write a program that checks if a number is even or odd.

  2. Create a program that determines the grade based on a given score (e.g., A for 90+, B for 80-89, etc.).

Loops (for, while):

  1. Write a program that prints all numbers from 1 to 10.

  2. Create a program that calculates the factorial of a number.

Level 2: Functions and Classes (Medium)

Functions:

  1. Define a function that takes two numbers as input and returns their sum.

  2. Write a function that checks if a string is a palindrome (reads the same backward as forward).

Classes and Objects:

  1. Create a class representing a book with attributes like title, author, and genre.

  2. Define methods in the book class to display book information or change its genre.

Inheritance:

  1. Create a subclass of the book class named "E-book" with an additional attribute "file format".

  2. Override the display method in the E-book class to include the file format.

Level 3: Data Structures and Algorithms (Advanced)

Arrays and Lists:

  1. Write a program that finds the maximum element in an array.

  2. Create a program that removes duplicate elements from a list.

Dictionaries and Hashes:

  1. Implement a simple phonebook application using a dictionary to store names and phone numbers.

  2. Write a program that counts the frequency of words in a given text string using a hash table.

Bonus Challenge:

  1. Simulate a simple ATM machine using functions and conditional statements. Allow users to withdraw, deposit, and check their balance.

  2. Design a basic e-commerce shopping cart program that keeps track of items, quantities, and calculates the total price.

Tips:

  • Start with a language you're comfortable with and then try others to understand the similarities and syntax variations.

  • Focus on writing clean, well-commented code that is easy to understand and maintain.

  • Utilize online resources, tutorials, and practice problems to solidify your learning.

  • Don't hesitate to experiment and explore different approaches to solve the challenges.


Submission Guidelines

Code and Data:

  1. Code:

    • Organize your code into well-commented, readable files.

    • Ensure each program is in its own file and named appropriately (e.g., even_odd_checker.py, book_class.py).

    • Include a main program or test cases to demonstrate the functionality of your code.

  2. Documentation:

    • Create a README file that explains the purpose of each program, how to run it, and any assumptions you made.

    • Include comments within your code to explain your logic and thought process.

  3. Submission:

    • Submit the ZIP file through Slack or simply upload to GitHub and share link to Repo.

Week 3 🟩

SQL Database: Building a Library Management System

This challenge introduces you to the fundamentals of database design and implementation using SQL while building a simple library management system.

Prerequisite

Before starting this challenge, ensure you have a foundational understanding of the following:

  • Basic SQL commands and database concepts.

  • Familiarity with database management systems (e.g., MySQL, PostgreSQL, SQLite).

  • Experience with a backend development language (e.g., Python, JavaScript, Java) and its corresponding SQL library for database interaction.

Problem Description

Imagine you are a software developer hired by a local library to modernize their management system. The library currently uses a paper-based system to track books, authors, and users, making it difficult to manage and prone to errors. Your task is to design and implement a database system that digitizes these records, streamlines the borrowing process, and provides easy access to information. Successfully completing this task demonstrates your ability to design efficient database schemas and perform essential CRUD operations, making you an attractive candidate for database and backend development roles.

Instructions

Objective: Design and implement a database schema to manage a library's books, authors, and users. Utilize SQL to perform CRUD (Create, Read, Update, Delete) operations on this data.

Part 1: Database Design (Conceptual Model)

  1. Entities:

    • Identify the main entities involved in the library system: Books, Authors, and Users (borrowers).

  2. Attributes:

    • Define the attributes for each entity:

      • Books: Title, Author ID (foreign key referencing Authors), Genre, Publication Year, ISBN (unique identifier).

      • Authors: Author ID (primary key), Name, Nationality.

      • Users: User ID (primary key), Name, Email, Phone number.

  3. Relationships:

    • Establish relationships between entities:

      • A book has one author (One-to-Many relationship between Books and Authors).

      • A user can borrow multiple books (Many-to-Many relationship between Users and Books, requiring a separate table to record borrowings with timestamps).

Part 2: Database Implementation (SQL)

  1. Create Database:

    • Use SQL commands (e.g., CREATE DATABASE library_management) to create a database for your library system.

  2. Create Tables:

    • Create tables for each entity with their defined attributes using SQL CREATE TABLE statements.

    • Define data types for each attribute (e.g., INT, VARCHAR(255), DATE).

    • Implement primary and foreign key constraints to enforce data integrity.

  3. CRUD Operations (Using a chosen language and SQL library):

    • Choose a backend development language (e.g., Python with SQLAlchemy) and its appropriate SQL library for interacting with the database.

  4. Create:

    • Write code to insert new books, authors, and users into their respective tables using INSERT statements.

  5. Read:

    • Write code to retrieve information about books, authors, or users using SELECT statements.

    • Implement filtering and searching functionalities based on specific criteria (e.g., find books by author or genre).

  6. Update:

    • Write code to modify existing data in tables using UPDATE statements.

    • Allow users to update their information or library staff to update book details.

  7. Delete:

    • Write code to remove books, authors, or users (if applicable) using DELETE statements.

    • Consider implementing soft deletes (flagging as inactive) instead of permanent deletion.

Bonus Challenge:

  • Implement user authentication functionalities for secure access to the library system.

  • Explore advanced SQL features like JOINs to retrieve data across multiple tables (e.g., list books borrowed by a specific user).

  • Add functionalities to manage book borrowing and returning processes.

Learning Outcomes:

  • Gain practical experience in designing database schemas for real-world applications.

  • Understand the importance of data relationships and how to model them in a database.

  • Practice essential SQL operations for CRUD tasks on a database.

  • Apply backend development skills to interact with a database using your chosen language and libraries.

Submission Guidelines

  1. Code:

    • Submit your SQL scripts for database creation and table definitions.

    • Provide the backend code used to perform CRUD operations (e.g., Raw SQL scripts or Python scripts with SQLAlchemy).

  2. Data:

    • Include sample data used to test your CRUD operations.

    • Provide any additional scripts or configurations needed to set up the database and run the code.

Learning Resources

Week 4 🟩

Building an Email Subscription Service

Pre-requisite

Before starting this challenge, ensure you have the following skills and tools:

  1. Programming Proficiency: Experience with either Python or JavaScript, depending on the chosen framework.

  2. Web Development Knowledge: Understanding of web development principles and experience with building APIs.

  3. Database Basics: Familiarity with relational databases and basic SQL commands.

  4. Environment Setup: Ability to set up a development environment with the chosen framework (Flask/Django for Python or Express for Node.js).

Problem Description

Imagine you are working for a small online magazine that wants to grow its readership. The magazine decides to add an email subscription service to notify readers about new articles, special events, and exclusive content. Your task is to develop the backend system that handles user subscriptions, ensuring data is collected securely and stored efficiently. This project demonstrates your ability to build robust web applications, handle user data securely, and integrate with databases, making you an appealing candidate for backend development roles.

Instructions:

Develop an app that compiles an email subscription list by submitting their first name, last name, and email address. Upon successful submission, store the user's information in a database.

Technology Stack (Choose a Stack):

  • Python (Flask/Django): Leverage a Python framework like Flask or Django to build the backend API.

  • Node.js (Express): Utilize Express.js for creating the backend server and handling API requests.

  • Etc.

Steps:

  1. Project Setup:

    • Set up your development environment with your chosen framework.

    • Install any additional libraries needed for database interaction (e.g., SQLAlchemy for Python, Mongoose for Node.js).

  2. Database Configuration:

    • Choose a database management system (e.g., PostgreSQL, MySQL).

    • Configure your backend application to connect to the database.

    • Define a database table to store user information (first_name, last_name, email).

  1. Database Interaction:

  • Upon receiving a valid subscription request, use your chosen database library to:

    • Connect to the database.

    • Prepare an SQL statement (Python) or a Mongoose model (Node.js) to insert the user's information into the subscription table.

    • Execute the statement and save the data.

  1. Error Handling and Response:

  • Implement proper error handling for potential issues like database connection failures or invalid user data.

  • Provide informative responses to the client (user) indicating success or failure of the subscription request.

Submission Guidelines

  1. Code Submission:

    • Provide a well-documented codebase that includes:

      • Database configuration and interaction logic.

      • Data validation and sanitization mechanisms.

      • Error handling and response strategies.

    • Ensure the code is clean, well-commented, and follows best practices for readability and reproducibility.

  2. Data Submission:

    • Include any database schema definitions or SQL scripts used to create the subscription table (or Screenshots to show successful insertion of data).

Learning Resources

Week 5 🟩

Building a Secure Sign-up and Login System

This challenge focuses on developing a secure and functional sign-up and login system for a web application. The challenge is designed to be framework-agnostic, allowing developers using various technologies like Django, .NET, Java, Laravel, or even plain PHP to participate.

Prerequisite:

  • Basic understanding of web development and server-side programming.

  • Familiarity with your chosen backend framework (e.g., Django, .NET, Java, Laravel, PHP).

  • Knowledge of HTTP methods and RESTful API design.

  • Understanding of basic security principles (e.g., hashing, HTTPS, input validation).

Problem Description:

Imagine you're working for a tech startup developing a new web application. One of the core requirements is to build a secure user authentication system that ensures only authorized users can access specific features. This system will not only safeguard user data but also enhance the user experience by providing a seamless and secure login process. Successfully implementing this system will demonstrate your ability to handle critical aspects of web security and user management, making you an attractive candidate for any development team focused on building secure applications.

Instructions:

Implement a backend API that handles user registration and login functionalities.

Requirements:

  1. User Registration:

    • Allow users to register with an email address, password, and potentially additional information like a username.

    • Validate user input for proper format (e.g., email validity).

    • Securely store passwords using a hashing algorithm (e.g., bcrypt, PBKDF2).

    • Consider sending a confirmation email after registration.

  2. User Login:

    • Enable users to log in using their email address and password.

    • Validate user credentials against stored information.

    • Implement a session management mechanism (e.g., sessions, tokens) to identify authenticated users.

    • Optionally, allow remembering login status for convenience.

  3. Security Considerations:

    • Enforce strong password policies (minimum length, character complexity).

    • Prevent common vulnerabilities like SQL injection or cross-site scripting (XSS).

    • Use secure communication protocols (HTTPS) for user data transmission.

Framework-Specific Implementation:

  • While the core functionalities remain the same, the implementation details will vary depending on the chosen framework (Django, .NET, Java, Laravel, or plain PHP).

  • Leverage the strengths of your chosen framework for user data storage (databases), authentication mechanisms (built-in or third-party libraries), and session management.

Bonus Challenge:

  • Implement password reset functionality to allow users to recover forgotten passwords.

  • Integrate social login options (e.g., Google, Facebook) using available libraries.

  • Design an API endpoint for user profile management (update information, change password).

  • Implement role-based access control (RBAC) to restrict access to certain functionalities based on user roles.

Learning Outcomes:

  • Gain practical experience building user authentication functionalities in your preferred backend framework.

  • Understand the importance of secure password storage and validation.

  • Learn best practices for session management and user authentication.

  • Explore framework-specific tools and libraries for user management.

Benefits (Framework-Agnostic):

  • This challenge allows developers of various backgrounds to participate, fostering learning across different technologies.

  • Focus on core concepts like user registration, login, and security while implementing them within your chosen framework.

Submission Guidelines:

  1. Code:

    • Submit a well-documented codebase that includes your implementation for user registration, login, and session management.

    • Ensure your code follows best practices for readability, modularity, and security.

  2. Documentation:

    • Provide a README file with setup instructions, explaining how to run your application locally.

    • Include API documentation outlining the endpoints, request/response formats, and any necessary headers or tokens.

  3. Data:

    • Include sample data or a script to populate the database with test users.

    • Ensure sensitive data (like passwords) is appropriately hashed and not stored in plain text.

  4. Live Demo (Optional):

    • If possible, deploy your application on a platform like Heroku, AWS, or any cloud service.

    • Provide a link to the live demo for easy access and testing.

Learning Resources

Week 6

Week 7

Week 8

Week 9

Week 10

Week 11

Week 12

Last updated