Skip to content

aryandas2911/DailyForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

301 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”¨ DailyForge

Build routines. Forge habits. Own your week.

DailyForge is an open-source fullstack MERN productivity app that lets you design, manage, and visualize your weekly routines β€” with drag-and-drop scheduling, a smart task library, and overlap protection built right in.

GSSoC PRs Welcome Stars

🌐 Live Demo Β· ⚑ Quick Start Β· 🀝 Contribute Β· πŸ“Έ Screenshots


πŸ“‘ Table of Contents


πŸš€ Project Overview

Most productivity tools are either too bloated or too simple. DailyForge is a no-nonsense weekly planner that gives you total control over your schedule β€” built by students, for students and professionals alike.

What it does:

  • Build a reusable task library with custom durations, colors, and categories
  • Design weekly routines by dragging tasks into a visual time grid
  • Save, update, and delete routines with one click
  • Automatically detects and prevents scheduling conflicts for the same day

Why it matters:
Most people don't fail to plan β€” they fail to stick to a plan. DailyForge makes routines feel visual and deliberate, making habits easier to build and track.

Key highlights:

  • ⚑ Drag-and-drop weekly planner powered by @dnd-kit
  • πŸ”’ Secure JWT authentication with bcrypt password hashing
  • πŸ—‚οΈ Reusable routine templates to clone and reuse schedules
  • 🚫 Conflict detection β€” no overlapping tasks on the same day
  • πŸ“± Clean, responsive UI built with React 19 + Tailwind CSS v4

🌐 Live Demo

Service URL
πŸ–₯️ Frontend https://dailyforge-frontend-lhjq.onrender.com
βš™οΈ Backend API https://dailyforge-backend.onrender.com

⚠️ Deployed on Render's free tier β€” first load may take 30–60 seconds to spin up.


✨ Features

πŸ” Authentication

  • Signup / Login with JWT-based session management
  • Protected routes β€” unauthenticated users are redirected to login
  • Passwords hashed with bcrypt

πŸ“‹ Task Management

  • Create tasks with: title, duration, color, and category
  • Edit and delete tasks from your personal task library
  • Tasks persist across sessions

πŸ—“οΈ Routine Builder

  • Drag tasks from your library onto a 7-day weekly grid
  • Time-slot-based placement with visual feedback
  • Overlap detection prevents conflicting task placement on the same day

πŸ“Š Dashboard

  • Interactive Contribution Heatmap: A premium, GitHub-style 371-day productivity calendar that tracks consistency with stunning teal and glowing mint aesthetics.
    • 4-Level Visual Scale: Cell intensities map to completed counts (1 task $\rightarrow$ low, 2 tasks $\rightarrow$ medium, 3+ tasks $\rightarrow$ perfect glowing mint).
    • Streak & Productivity Tracking: Real-time calculations of current streaks, longest streaks, total productive days, and average day-wise completion rate.
    • Completing Date-Matching: Tracks contributions using the actual task completion timestamp (completedAt), fully timezone-robust to your local browser.
    • Micro-Animations & Smart Tooltips: Staggered cell entry animations and edge-aware floating tooltips that slide horizontally to prevent bounding box clipping.
    • Upcoming Days Protection: Future dates automatically render as hidden, transparent slots until they arrive.
  • View all saved routines at a glance
  • Quick access to edit or delete any routine
  • Summary stats for your weekly schedule and completion progress

♻️ Routine Templates

  • Save any routine as a reusable template
  • Re-apply templates to any week in seconds

πŸ— Tech Stack

Frontend

Technology Purpose
React 19 UI framework
Vite Build tool & dev server
Tailwind CSS v4 Utility-first styling
@dnd-kit/core Drag-and-drop interactions
Axios HTTP client for API calls
React Router DOM v7 Client-side routing
Lucide React Icon library
Context API Global auth state management
Firebase Client Google Sign-In authentication integration

Backend

Technology Purpose
Node.js Runtime environment
Express.js v5 REST API framework
MongoDB Atlas Cloud database
Mongoose v9 ODM for MongoDB
JSON Web Token (JWT) Stateless authentication
Bcrypt Password hashing
Firebase token verification RS256 Google ID token signature verification
dotenv Environment variable management
Nodemon Dev server with hot-reload

πŸ“‚ Project Structure

DailyForge/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/                 # DB connection config
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ authController.js   # Signup, login logic
β”‚   β”‚   β”œβ”€β”€ routineController.js
β”‚   β”‚   └── taskController.js
β”‚   β”œβ”€β”€ middlewares/
β”‚   β”‚   └── authMiddleware.js   # JWT verification
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ authRoutes.js
β”‚   β”‚   β”œβ”€β”€ routineRoutes.js
β”‚   β”‚   └── taskRoutes.js
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ models/             # Mongoose schemas
β”‚   β”‚   β”‚   β”œβ”€β”€ User.model.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Task.model.js
β”‚   β”‚   β”‚   └── Routine.model.js
β”‚   β”‚   └── server.js           # Express app entry point
β”‚   β”œβ”€β”€ .env                    # ← You create this (see below)
β”‚   └── package.json
β”‚
└── frontend/
    β”œβ”€β”€ public/
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ api/
    β”‚   β”‚   └── axiosConfig.js  # Axios base URL config
    β”‚   β”œβ”€β”€ components/
    β”‚   β”‚   β”œβ”€β”€ Dashboard/
    β”‚   β”‚   β”œβ”€β”€ Routine/
    β”‚   β”‚   β”œβ”€β”€ Task/
    β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
    β”‚   β”‚   └── ProtectedRoutes.jsx
    β”‚   β”œβ”€β”€ context/
    β”‚   β”‚   └── AuthContext.jsx
    β”‚   β”œβ”€β”€ hooks/
    β”‚   β”‚   └── useTasks.js
    β”‚   β”œβ”€β”€ pages/
    β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx
    β”‚   β”‚   β”œβ”€β”€ RoutineBuilder.jsx
    β”‚   β”‚   β”œβ”€β”€ Tasks.jsx
    β”‚   β”‚   β”œβ”€β”€ Login.jsx
    β”‚   β”‚   └── Signup.jsx
    β”‚   β”œβ”€β”€ utils/
    β”‚   β”œβ”€β”€ App.jsx
    β”‚   └── main.jsx
    β”œβ”€β”€ index.html
    β”œβ”€β”€ vite.config.js
    └── package.json

πŸ”„ Project Setup Flow

Understanding the application flow makes it much easier for new contributors to navigate the codebase, debug issues, and add new features. The diagram below illustrates how a request travels through the application.

πŸ“Š High-Level Architecture

flowchart LR A["πŸ‘€ User"] --> B["βš›οΈ React Frontend"] B --> C["🌐 Axios API Requests"] C --> D["πŸš€ Express.js Backend"] D --> E["🧩 Controllers"] E --> F["πŸ“¦ Mongoose Models"] F --> G["πŸƒ MongoDB Atlas"] G --> H["πŸ“€ JSON Response"] H --> I["πŸ”„ React State Update"] I --> J["πŸ–₯️ Updated UI"]


βš™οΈ Request Lifecycle

Step| Description πŸ‘€ 1. User Interaction| The user creates, edits, deletes, or schedules a task from the React frontend. 🌐 2. API Communication| Axios sends an HTTP request to the Express backend API. πŸš€ 3. Route Handling| Express routes forward the request to the appropriate controller. 🧩 4. Business Logic| Controllers validate input, apply business rules, and prepare database operations. πŸ“¦ 5. Database Layer| Mongoose communicates with MongoDB Atlas to store or retrieve application data. πŸ“€ 6. Server Response| The backend returns a JSON response containing the requested or updated data. πŸ”„ 7. UI Update| React updates the application state and refreshes the interface instantly.


πŸ“‚ Developer Workflow

Fork Repository β”‚ β–Ό Clone Repository β”‚ β–Ό Install Dependencies β”‚ β–Ό Configure Environment Variables β”‚ β–Ό Start Backend Server β”‚ β–Ό Start Frontend Server β”‚ β–Ό Build β€’ Test β€’ Contribute πŸš€


πŸ’‘ Why This Diagram?

  • πŸš€ Helps first-time contributors understand the project architecture.
  • πŸ“– Provides a clear overview of the frontend β†’ backend β†’ database workflow.
  • πŸ› οΈ Makes debugging and feature development easier.
  • 🀝 Improves onboarding for GSSoC and open-source contributors.
  • πŸ“š Serves as a quick reference for the application's request lifecycle.

⚑ Quick Start

Prerequisites: Node.js v18+, npm v9+, a free MongoDB Atlas account

1. Clone the repository

git clone https://github.com/aryandas2911/DailyForge.git
cd DailyForge

2. Set up the Backend

cd backend
npm install

Create your .env file from the given template (see the Environment Variables section below):

# macOS / Linux
cp .env.example .env

# Windows (Command Prompt)
copy .env.example .env

# Windows (PowerShell)
Copy-Item .env.example .env

Then fill in your values (see the next section for what each variable means).

⚠️ Local dev note: The backend CORS origin is already configured for both the deployed frontend (https://dailyforge-frontend-lhjq.onrender.com) and local development (http://localhost:5173) in backend/src/server.js. No changes are needed for local development.

Start the backend dev server:

npm run dev

βœ… Server should start at http://localhost:5000


3. Set up the Frontend

Open a new terminal, then:

cd frontend
npm install

πŸ’‘ Local dev note: To point the frontend to your local backend, copy frontend/.env.example to frontend/.env and ensure VITE_API_URL is set to http://localhost:5000/api.

Start the frontend dev server:

npm run dev

βœ… App should open at http://localhost:5173


βœ… You're ready!

Open http://localhost:5173, sign up for an account, and start building your routines.


πŸ” Environment Variables

Backend β€” backend/.env

Copy the provided template to get started. Never commit the .env to git.

PORT=5000
MONGO_URI=your_mongodb_atlas_connection_string
JWT_SECRET=your_super_secret_key_here
#CLIENT_ORIGIN=your_deployed_frontend_url
Variable Required Description
PORT βœ… Port on which the Express server runs (default: 5000)
MONGO_URI βœ… Full MongoDB Atlas connection string β€” get it from your Atlas cluster's "Connect" menu
JWT_SECRET βœ… Secret key for signing JWTs β€” use any long, random string (e.g., openssl rand -hex 32)
CLIENT_ORIGIN ⬜ (Optional) Allowed CORS origin for API requests. Set this to your production frontend URL (e.g., https://dailyforge-frontend-lhjq.onrender.com). If not set, it defaults to http://localhost:5173 for local development.

How to get MONGO_URI:

  1. Log into MongoDB Atlas
  2. Create a free M0 cluster (if you haven't)
  3. Click Connect β†’ Connect your application β†’ Copy the connection string
  4. Replace <password> with your DB user's password

Frontend β€” frontend/.env

Copy the provided .env.example to a new file named .env.

Variable Required Description
VITE_API_URL βœ… Base URL for frontend API requests, usually http://localhost:5000/api in local development.
VITE_FIREBASE_API_KEY βœ… Firebase client API key used by Firebase SDK for authentication.
VITE_FIREBASE_AUTH_DOMAIN βœ… Firebase Auth domain for your project (e.g. your-project.firebaseapp.com).
VITE_FIREBASE_PROJECT_ID βœ… Firebase project identifier used by the frontend and backend.
VITE_FIREBASE_STORAGE_BUCKET βœ… Firebase storage bucket name for your project (even if storage is not used directly).
VITE_FIREBASE_MESSAGING_SENDER_ID βœ… Firebase messaging sender ID required for client configuration.
VITE_FIREBASE_APP_ID βœ… Firebase app ID for the registered web app.

Running locally? Update VITE_API_URL in your local .env file to http://localhost:5000/api/.

Note: For Firebase credential values, see the existing Google Authentication Setup section below.


🌐 Google Authentication Setup

DailyForge supports Google Authentication via Firebase. Follow these steps to configure and enable Google Sign-In:

1. Firebase Console Setup

  1. Go to the Firebase Console and click Add project to create a new project.
  2. Once the project is created, click the Web icon (</>) on the Project Overview page to register a new Web App.
  3. Copy the firebaseConfig object containing the API key, app ID, etc.
  4. Go to Build β†’ Authentication in the left sidebar and click Get Started.
  5. Under the Sign-in method tab, click Add new provider and select Google.
  6. Enable the provider, configure your support email, and click Save.

2. Environment Variables Configuration

To enable the frontend and backend integration, copy the configuration values into your respective .env files:

Frontend β€” frontend/.env

Append your Firebase client configuration to your local .env file:

# Firebase Client configuration
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
VITE_FIREBASE_APP_ID=your_app_id

Backend β€” backend/.env

Add your Firebase Project ID to secure RS256 token verification:

# Firebase verification configuration
FIREBASE_PROJECT_ID=your_project_id

🧩 REST API Reference

Base URL: /api

JWT Authorization header:

Authorization: Bearer <token>

Authentication

Method Endpoint Auth Required Description
POST /api/auth/signup No Register a new user
POST /api/auth/login No Login with email and password
POST /api/auth/google-login No Login using Google authentication
GET /api/auth/user Yes Get the current authenticated user
PUT /api/auth/update-profile Yes Update the current user's profile
POST /api/auth/logout Yes Log out the current user

Tasks

Method Endpoint Auth Required Description
POST /api/tasks Yes Create a new task
GET /api/tasks Yes Get all tasks for the authenticated user
PUT /api/tasks/:id Yes Update a task by ID
DELETE /api/tasks/:id Yes Delete a task by ID

Routines

Method Endpoint Auth Required Description
POST /api/routines Yes Create a new routine
GET /api/routines Yes Get all routines for the authenticated user
PUT /api/routines/:id Yes Update a routine by ID
DELETE /api/routines/:id Yes Delete a routine by ID

Analytics

Method Endpoint Auth Required Description
GET /api/analytics Yes Get analytics/statistics for the authenticated user

πŸ”„ System Flow Overview

This section shows how the frontend, API requests, backend, and database interact during common actions like creating a task or scheduling a routine.

1. User Action (Frontend)

  • The user creates a task or drags it into the routine grid.
  • The React UI handles this using components in frontend/src/components/ (e.g. TaskCard, RoutineGrid).
  • State is managed via Context API / hooks.

2. API Request

  • The frontend sends an HTTP request (Axios/fetch) to the backend:
    • POST /api/tasks for new tasks
    • POST /api/routines for routine changes
  • Requests include the necessary payload (task details, routine metadata, user ID).

3. Backend Processing

  • An Express route receives the request in backend/routes/.
  • The corresponding controller (e.g. taskController.js, routineController.js) validates and processes the data.
  • Business logic (conflicts, schedule rules, etc.) is handled here before hitting the database.

4. Database Layer

  • Mongoose models (e.g. Task.js, Routine.js, User.js) define the schema.
  • MongoDB stores tasks, routines, and user data.
  • On success, the database returns the updated/created documents to the backend.

5. Response to Frontend

  • The backend returns a JSON response with the latest task/routine state.
  • The React app updates UI state (Context/hooks), so the grid and lists stay in sync with the backend.

πŸ’‘ Why this section exists

  • Helps new contributors see the full end-to-end flow quickly.
  • Makes it easier to debug issues (know where to look: component β†’ API β†’ controller β†’ model).
  • Improves onboarding for new contributors (e.g. GSSoC participants).

❓ FAQ

Why is the app slow on first load?

The project is deployed on Render’s free tier. Services may go to sleep after inactivity, so the first request can take around 30–60 seconds to respond.


Which Node.js version should I use?

Recommended versions:

  • Node.js v18+
  • npm v9+

Check your installed versions:

node -v
npm -v

Do I need MongoDB installed locally?

No. DailyForge uses MongoDB Atlas, so you only need a free Atlas account and a valid connection string.


Why am I getting CORS errors during local development?

Make sure:

  • Your backend is running on http://localhost:5000. The server already allows http://localhost:5173 by default β€” no code changes needed.
  • Your frontend .env contains:
VITE_API_URL=http://localhost:5000/api
  • If you are still seeing CORS errors, set CORS_ORIGIN=http://localhost:5173 in your backend/.env and restart the server.

Where should I add environment variables?

Backend variables go inside:

/backend/.env

Frontend variables go inside:

/frontend/.env

πŸ›  Troubleshooting

Issue Common Cause Quick Fix
CORS Errors CLIENT_ORIGIN or FRONTEND_URL mismatch in backend .env. Ensure backend .env has correct origin (e.g., http://localhost:5173). Restart the server after changes.
MongoDB Connection Error Incorrect MONGO_URI, wrong credentials, or IP not whitelisted. Verify MONGO_URI, replace <password> with correct DB password, and whitelist 0.0.0.0/0 in MongoDB Atlas Network Access.
Frontend Cannot Connect to Backend Backend not running, wrong API URL, or port mismatch. Set VITE_API_URL=http://localhost:5000/api and ensure backend is running on http://localhost:5000.
JWT Authentication Errors Missing or incorrect JWT_SECRET. Add JWT_SECRET in backend/.env and restart the backend server.
Dependency Conflicts React 19 / Tailwind v4 strict peer dependency issues. Run npm install --legacy-peer-deps in both frontend and backend directories.
Glitchy Drag-and-Drop Browser extensions interfering with DOM events. Test the app in Incognito mode or disable extensions.
Port Already in Use Another process is using the same port. Stop the running process or change PORT in .env (e.g., PORT=5001).
Dependency Installation Issues Corrupted node_modules or lock file conflicts. Run rm -rf node_modules package-lock.json && npm install.

🀝 Contribution Guidelines

We love contributions! DailyForge is actively participating in GSSoC 2026 and welcomes contributors of all experience levels.

πŸ“„ Read the full guidelines: CONTRIBUTING.md

Quick Contribution Flow

1. Pick an issue

  • Browse open issues
  • Look for good first issue if you're new
  • Comment on the issue to get it assigned before starting work

2. Fork & branch

git clone https://github.com/<your-username>/DailyForge.git
cd DailyForge
git checkout -b <type>/<short-description>

Branch naming convention:

Type Example
New feature feature/add-dark-mode
Bug fix fix/login-redirect-loop
Documentation docs/update-readme
Refactor refactor/task-hook-cleanup

3. Make your changes

  • Keep changes focused β€” one issue per PR
  • Follow the existing code style
  • Test your changes locally before pushing

4. Open a Pull Request

  • Fill out the PR template completely
  • Link the issue it resolves using Closes #<issue-number>
  • Request a review from a maintainer

⚠️ PRs without a linked issue or description will not be reviewed.


🏷 Issue Guidelines

We use labels to organize work. Here's what they mean:

Label Meaning
good first issue Small, well-scoped tasks β€” perfect for first-time contributors
bug Something is broken or behaving incorrectly
feature New functionality to be added
documentation Improvements to README, guides, or inline comments
help wanted Maintainers need external input or assistance
testing Adding or improving test coverage

Tips for new contributors:

  • Start with good first issue β€” they're designed to be approachable
  • Don't hesitate to ask questions in the issue comments
  • One issue at a time β€” don't take on multiple issues until your first PR is merged

πŸ“Έ Screenshots

πŸ” Signup Page

Signup Page

πŸ“Š Dashboard Overview

Dashboard

πŸ“‹ Tasks Page

Tasks Page

πŸ—“οΈ Drag-and-Drop Routine Builder

Routine Builder



πŸ”„ Project Setup Flow Diagram

graph TD
    A[User Opens App] --> B[React Frontend]
    B --> C[API Request]
    C --> D[Express Server]
    D --> E[Controllers]
    E --> F[MongoDB Database]
    F --> G[JSON Response]
    G --> H[React State Update]
    H --> I[UI Re-render]
Loading

πŸ—οΈ System Architecture

Layer Technology Responsibility
Frontend React + Vite User Interface
Backend Express.js API Services
Database MongoDB Data Storage
Authentication Firebase User Login
State Management Context API UI State

πŸ“‚ Project Structure

frontend/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ hooks/
β”‚   └── context/

backend/
β”œβ”€β”€ controllers/
β”œβ”€β”€ routes/
β”œβ”€β”€ models/
└── middleware/

⚑ Request Lifecycle

  1. User performs an action.
  2. React captures the event.
  3. API request is sent.
  4. Express routes receive the request.
  5. Controller processes logic.
  6. Database is queried.
  7. Response is returned.
  8. React updates the interface.

πŸš€ Contribution Workflow

graph LR
    A[Fork Repository]
    B[Create Branch]
    C[Make Changes]
    D[Commit Changes]
    E[Push Branch]
    F[Open Pull Request]

    A --> B --> C --> D --> E --> F
Loading

πŸ›  Development Workflow

git clone repository
npm install
npm run dev

πŸ’‘ Why This Section Matters

  • Helps new contributors understand the codebase.
  • Makes onboarding easier.
  • Improves debugging.
  • Explains frontend and backend interaction.
  • Reduces confusion for first-time contributors.
  • Improves GSSoC contributor experience.

πŸ“¬ Getting Help

Need help with setup or contributing?

You can:

  • Open a GitHub Issue
  • Comment on an existing issue for clarification
  • Contact the maintainer through the email provided below

Before asking for help:

  • Read the setup instructions carefully
  • Check the FAQ and Troubleshooting sections
  • Search existing GitHub issues first

We welcome contributors of all experience levels πŸš€


πŸ“¬ Contact & Community

πŸ’– Contributors

Thanks to all the amazing people who contribute to DailyForge πŸš€

Contributors


⭐ Project Support

Stars Β Β  Forks


Have questions, ideas, or want to connect with other contributors?

Channel Link
πŸ“§ Email aryandas2911@gmail.com
πŸ› Issues GitHub Issues

Built with ❀️ for GSSoC 2026

If DailyForge helped you, consider giving it a ⭐ β€” it helps more contributors find the project!

About

DailyForge is an open-source fullstack MERN productivity app that lets you design, manage, and visualize your weekly routines - with drag-and-drop scheduling, a smart task library, and overlap protection built right in.

Resources

License

Code of conduct

Contributing

Security policy

Stars

141 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages