Skip to content

Instantly share code, notes, and snippets.

@shri-kanth
Created January 24, 2025 10:23
Show Gist options
  • Save shri-kanth/feada05bba5b29b33a2cde06facbd543 to your computer and use it in GitHub Desktop.
Save shri-kanth/feada05bba5b29b33a2cde06facbd543 to your computer and use it in GitHub Desktop.
Task 2

Task Description:

Build a simple event management application that allows users to create, update, and manage their events. The application will include features for user authentication, personalized event reminders, and viewing a personalized event calendar. This involves developing a RESTful API, a database schema, and a user interface.

Frontend Requirements:

  1. Set up a React project using TypeScript.
  2. Implement user authentication:
    • Design a registration and login page allowing users to authenticate using an email and password.
    • Use JWT to manage user sessions and secure endpoints.
  3. Develop a user interface with the following functionalities for authenticated users:
    • Create and manage personal events with details, such as:
      • Event ID: Unique identifier for each event.
      • Title: Event title.
      • Description: Detailed description of the event.
      • Location: Physical or virtual location details.
      • Date and Time: Scheduled date and time of the event.
      • Reminders: Set reminders for the event.
    • View a personalized event calendar.
    • Search and filter events by title or location.
    • Sort events by date and time.
  4. Implement error handling and validation for all input fields and authentication processes.

Backend Requirements:

  1. Set up a Node.js project with Express.js and TypeScript.
  2. Implement authentication using JWT to secure the endpoints:
    • POST /auth/register: Register new users with email and hashed password.
    • POST /auth/login: Authenticate users and return an access token.
    • Middleware to protect routes and verify user tokens.
  3. Implement the following RESTful API endpoints for authenticated users:
    • GET /events: Retrieve a list of personal events, optionally filtered by search query.
    • POST /events: Create a new event for the user.
    • PUT /events/:id: Update an event's details.
    • DELETE /events/:id: Remove an event.
    • GET /calendar: Retrieve events formatted for a calendar view.
  4. Use MySQL with TypeORM to create database schemas for storing user and event information.
  5. Implement logic to handle event reminders and validate appropriate event data.

Database Requirements:

  1. Set up a MySQL database and configure a connection using TypeORM.
  2. Create tables for Users, Events and Reminders with appropriate columns and data types:
    • Users table should store user credentials securely.
    • Events table should store event details and associated user IDs.
    • Reminders table should store reminders for an event

Additional Functionality:

  1. Event Reminders:

    • Implement an option for users to create reminders about upcoming events.
    • Include functionality to show reminders with in the app based on a user-set time before the event.
  2. Personalized Calendar:

    • Enable a calendar view displaying events, allowing users to easily see their scheduled events throughout the month.
  3. Search and Sort:

    • Add search functionality to filter events by title or location.
    • Add sort functionality to allow sorting of events by date and time.

Acceptance Criteria:

  1. The React application securely handles user registration and authentication, managing sessions effectively.
  2. Event management functionalities are robust, enabling users to create, update, delete, and view events in a calendar format.
  3. Accurate reminder logic ensures users are notified about upcoming events based on their preferences.
  4. Proper database setup includes Users and Events tables with accurate, retrievable, and consistent data.
  5. Code should be well-organized, readable, and conform to best practices in TypeScript and security standards.

Expectations:

  • This task assesses the developer's proficiency in the tech stack and their ability to handle secure data handling, robust event management, and dynamic user notifications.
  • If there are any gaps or assumptions needed within the task, developers are encouraged to make reasonable assumptions and document these assumptions clearly in their code or accompanying documentation.
  • The developer should be able to explain their design and implementation decisions if asked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment