Welcome to JUSTDO, a sleek and powerful to-do list application built with the MERN stack. This application features a stunning, animated "Cosmic Aurora" theme, providing a beautiful and engaging user experience for managing daily tasks.
The project is organized into two main directories:
- /my-app: The Frontend application built with React.
- /Backend: The Backend server built with Node.js, Express, and MongoDB.
JUSTDO_PROJECT/ ├── Backend/ │ ├── conn/ │ ├── models/ │ ├── routes/ │ ├── node_modules/ │ ├── .env │ ├── App.js │ └── package.json | | | |--my-app(fronend)/ ├── public/ ├── src/ │ ├── components/ │ ├── store/ │ ├── App.js │ └── index.js ├── node_modules/ └── package.json
- User Authentication: Secure user registration and login system with password hashing.
- Smart Redirect: If a user tries to log in without an account, they are automatically redirected to the signup page.
- Full CRUD Functionality: Create, Read, Update, and Delete tasks seamlessly.
- Responsive Design: A beautiful and consistent user interface that works on all devices, from mobile to desktop.
- State Management: Centralized state management using Redux Toolkit for a predictable and scalable application state.
- Interactive UI:
- Stunning "Cosmic Aurora" animated background.
- Modern "frosted glass" (glassmorphism) effect on UI elements.
- Dynamic hover effects and notifications for an enhanced user experience.
- RESTful API: A well-structured backend API built with Node.js and Express for handling all application logic.
- React.js: For building the user interface.
- Redux Toolkit: For efficient and predictable state management.
- React Router DOM: For handling client-side routing.
- Axios: For making HTTP requests to the backend API.
- React-Toastify: For displaying beautiful, non-blocking notifications.
- React Icons: For including a wide range of icons.
- CSS: Custom CSS for the unique "Cosmic Aurora" theme.
- Node.js: As the JavaScript runtime environment.
- Express.js: As the web application framework.
- MongoDB: As the NoSQL database for storing user and task data.
- Mongoose: As the Object Data Modeling (ODM) library for MongoDB.
- Bcrypt.js: For hashing user passwords securely.
- CORS: To enable Cross-Origin Resource Sharing.
- Dotenv: For managing environment variables.
To get a local copy up and running, follow these simple steps.
- Node.js and npm (or yarn) installed on your machine.
- A MongoDB Atlas account or a local MongoDB instance.
-
Clone the repository:
git clone [https://github.com/your-username/justdo-app.git](https://github.com/your-username/justdo-app.git) cd justdo-app -
Install Backend Dependencies: Navigate to the
Backenddirectory and install the required packages.cd Backend npm install -
Install Frontend Dependencies: Navigate to the
my-app(frontend) directory and install the required packages.cd ../my-app npm install
The backend requires a .env file to store your database connection string.
- Create a file named
.envin theBackenddirectory. - Add your MongoDB connection URI to it:
MONGO_URI="your_mongodb_connection_string"
You need to run both the frontend and backend servers concurrently in separate terminals.
-
Start the Backend Server: In the
Backenddirectory, run:node App.js
The server will start on
http://localhost:1000. -
Start the Frontend Development Server: In the
my-appdirectory, run:npm start
The application will open in your browser at
http://localhost:3000.
Here’s a guide to deploying the MERN stack application using popular free-tier services like Render for the backend and Vercel for the frontend.
- Push your code to a GitHub repository.
- Sign up or Log in to Render.
- Click New + > Web Service.
- Connect your GitHub repository.
- Configure the service:
- Name:
justdo-backend(or your choice). - Root Directory:
Backend - Runtime:
Node - Build Command:
npm install - Start Command:
node App.js
- Name:
- Go to the Environment tab and add your
MONGO_URIas a secret key. - Click Create Web Service. Render will deploy your backend. Copy the deployed URL (e.g.,
https://justdo-backend.onrender.com).
-
Update API calls in your frontend code. In your React components (like
Signin.jsx,Todo.jsx, etc.), replacehttp://localhost:1000with your deployed backend URL. It's best to use an environment variable for this. -
Sign up or Log in to Vercel.
-
Click Add New... > Project.
-
Connect your GitHub repository.
-
Configure the project:
- Framework Preset:
Create React App - Root Directory:
my-app
- Framework Preset:
-
Go to Environment Variables and add a variable named
REACT_APP_API_URLwith the value of your deployed backend URL. -
Click Deploy. Vercel will build and deploy your frontend.
POST /register: Register a new user.POST /signin: Log in an existing user.
POST /addTask: Add a new task for a user.GET /getTasks/:id: Get all tasks for a specific user.PUT /updateTask/:id: Update a specific task.DELETE /deleteTask/:id: Delete a specific task.
Thank you for checking out JUSTDO!