Tasklytic is a simple task management app where users can create, view, edit, delete, and manage their tasks. The app allows users to mark tasks as complete or incomplete, view pending and completed tasks separately, and offers an intuitive task management experience. This app was built to help users stay organized with their tasks, offering a seamless way to manage to-do items.
- User authentication (registration and login)
- Create, read, update, and delete tasks
- Mark tasks as complete or incomplete
- View all tasks, pending tasks, or completed tasks separately
- Responsive design for mobile and desktop
- Secure password hashing with bcrypt
- Form validation (client-side and server-side)
- Session management with MongoDB storage
Before you begin, ensure you have the following installed:
-
Clone the repository
git clone https://github.com/Keya-Moradi/tasklytic.git cd tasklytic -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory by copying the example file:cp .env.example .env
Then edit the
.envfile with your own values:MONGO_URI=mongodb://localhost:27017/tasklytic SESSION_SECRET=your_secret_key_here PORT=3000 NODE_ENV=development
Important Notes:
- For
MONGO_URI:- Local MongoDB: Use
mongodb://localhost:27017/tasklytic - MongoDB Atlas: Get your connection string from your Atlas dashboard
- Local MongoDB: Use
- For
SESSION_SECRET: Generate a secure random string. You can use:node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
- For
-
Set up MongoDB
Option A: Local MongoDB
- Install MongoDB from mongodb.com/try/download/community
- Start MongoDB service:
# macOS (using Homebrew) brew services start mongodb-community # Linux sudo systemctl start mongod # Windows net start MongoDB
Option B: MongoDB Atlas (Cloud)
- Create a free account at mongodb.com/cloud/atlas
- Create a new cluster
- Click "Connect" and choose "Connect your application"
- Copy the connection string and paste it into your
.envfile asMONGO_URI - Replace
<password>with your database user password - Replace
myFirstDatabasewithtasklytic
-
Run the application
npm start
-
Access the app
Open your browser and navigate to:
http://localhost:3000
- Navigate to
http://localhost:3000/users/register - Create a new account with:
- Name (2-50 characters)
- Valid email address
- Password (minimum 8 characters with at least one uppercase, one lowercase, and one number)
- Log in with your credentials
- Start creating tasks!
- Click "Add New Task" in the navigation
- Fill in the task details:
- Title (required, max 200 characters)
- Description (optional, max 1000 characters)
- Due Date (required)
- Click "Create Task"
- View All Tasks: Click "All Tasks" to see all your tasks
- View Pending: Click "Pending Tasks" to see incomplete tasks
- View Completed: Click "Completed Tasks" to see finished tasks
- Mark Complete/Incomplete: Check or uncheck the checkbox next to any task
- Edit Task: Click "Edit Task" to modify task details
- Delete Task: Click "Delete Task" (you'll be asked to confirm)
tasklytic/
├── config/
│ └── passport.js # Passport authentication configuration
├── controllers/
│ ├── tasksController.js # Task CRUD operations
│ └── usersController.js # User authentication logic
├── models/
│ ├── task.js # Task schema
│ └── user.js # User schema
├── public/
│ ├── css/
│ │ └── styles.css # Application styles
│ └── images/ # Static images
├── routes/
│ ├── index.js # Home routes
│ ├── tasks.js # Task routes
│ └── users.js # User routes
├── views/
│ ├── tasks/ # Task-related views
│ ├── users/ # User-related views
│ └── index.ejs # Home page
├── .env.example # Environment variables template
├── .gitignore # Git ignore file
├── package.json # Project dependencies
├── server.js # Application entry point
└── README.md # This file
- Node.js
- Express.js
- MongoDB
- Mongoose
- Passport.js (for authentication)
- EJS (templating engine)
- CSS (for styling)
This project also uses third-party libraries and tools. Special thanks to the following:
- Express.js: The web framework used to build the server.
- Mongoose: For object modeling and managing MongoDB data.
- Passport.js: For authentication strategies, specifically Passport-local.
- bcrypt.js: For securely hashing passwords.
- connect-flash: For flash messages.
- connect-mongo: For MongoDB session storage.
- Body Parser: For parsing incoming request bodies in Express.
For more information on these tools, visit their respective documentation pages.
- Implement user-friendly CSS for a more polished and responsive UI.
- Add task prioritization features (high, medium, low).
- Enable task reminders via email or notifications.
- Integrate OAuth for social media login options.
