Full stack Test assignment
Full stack Test assignment
Create a simple blog application that allows users to register, log in, and create, read, update,
and delete (CRUD) posts, profile pictures.
. The application should be built using the MERN stack (MongoDB, Express.js, React, Node.js)
and deployed on AWS.
Objectives
1. User Authentication:
○ Implement user registration and login functionality.
○ Use JWT for authentication.
2. Post Management:
○ Allow authenticated users to create, read, update, and delete posts.
○ Each post should contain a title, content, and timestamp.
3. Deployment:
○ Deploy the backend on AWS using services like EC2, Lambda, or Elastic
Beanstalk.
○ Use AWS S3 for storing static files (e.g., user profile pictures, post images).
○ Implement CI/CD using AWS CodePipeline or other relevant services.
Detailed Requirements
1. User Authentication:
○ Use bcrypt to hash passwords.
○ Use JWT for securing endpoints.
2. API Endpoints:
○ POST /api/register: Register a new user.
○ POST /api/login: Authenticate a user and return a JWT.
○ POST /api/posts: Create a new post (authenticated users only).
○ GET /api/posts: Retrieve all posts (publicly accessible).
○ GET /api/posts/:id: Retrieve a single post by ID (publicly accessible).
○ PUT /api/posts/:id: Update a post by ID (authenticated users only).
○ DELETE /api/posts/:id: Delete a post by ID (authenticated users only).
3. Database:
○ Use MongoDB to store users and post data.
Frontend (React)
1. Authentication:
○ Implement user registration and login forms.
○ Store JWT in localStorage or sessionStorage.
2. Post Management:
○ Create a form for creating and editing posts.
○ Display a list of posts with options to view, edit, and delete (for the author).
3. Routing:
○ Use React Router to navigate between pages (e.g., home, login, register, create
post, edit post).
AWS Deployment
1. Backend Deployment:
○ Deploy the backend on AWS using EC2, Lambda, or Elastic Beanstalk.
○ Ensure the API is accessible over the internet.
2. Frontend Deployment:
○ Deploy the React application on AWS S3 and serve it using CloudFront.
3. CI/CD:
○ Set up a CI/CD pipeline using AWS CodePipeline, GitHub Actions, or another
relevant service to automate the deployment process.
Evaluation Criteria
Submission Guidelines
Timeline
You have 3 days to complete this assignment. If you have any questions, feel free to reach out.
Good luck!