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:
- Set up a React project using TypeScript.
- 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.
- 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.
- Create and manage personal events with details, such as:
- Implement error handling and validation for all input fields and authentication processes.
Backend Requirements:
- Set up a Node.js project with Express.js and TypeScript.
- 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.
- 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.
- Use MySQL with TypeORM to create database schemas for storing user and event information.
- Implement logic to handle event reminders and validate appropriate event data.
Database Requirements:
- Set up a MySQL database and configure a connection using TypeORM.
- Create tables for
Users
,Events
andReminders
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:
-
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.
-
Personalized Calendar:
- Enable a calendar view displaying events, allowing users to easily see their scheduled events throughout the month.
-
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:
- The React application securely handles user registration and authentication, managing sessions effectively.
- Event management functionalities are robust, enabling users to create, update, delete, and view events in a calendar format.
- Accurate reminder logic ensures users are notified about upcoming events based on their preferences.
- Proper database setup includes
Users
andEvents
tables with accurate, retrievable, and consistent data. - 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.