Habitrix is a full-stack MERN (MongoDB, Express.js, React.js, Node.js) habit-tracking web app built as part of my On-the-Job Training (OJT) project.
It helps users build habits, track consistency, log moods, and visualize progress through clean UI and interactive analytics.
This project represents what I learned during my MERN journey β from designing the frontend in React, setting up backend APIs, integrating MongoDB, handling authentication, and building a user-friendly dashboard.
- Secure signup & login
- JWT-based authentication
- Separate data for each user
- Add, edit, delete habits
- Mark habits daily
- Track streaks & consistency
- Organized "My Habits" page
- Built using Recharts
- Weekly / monthly analytics
- Line charts, bar charts, streak data
- Understand consistency visually
- Daily mood logging
- View mood patterns
- Simple & intuitive UI
- Shows all today's habits
- Quick progress overview
- Placeholder page for future community features
- Profile settings (basic UI)
- Logout
- Works smoothly on all screen sizes
- React.js
- React Router
- Recharts
- CSS / Tailwind (depending on your folder setup)
- Node.js
- Express.js
- MongoDB + Mongoose
- JWT Authentication
- Dotenv
- VS Code
- Git & GitHub
- Postman
- Vite
Based on your actual project:
Habit_tracker_OJT/
β
βββ Backend/
β βββ models/
β β βββ Challenge.js
β β βββ CommunityPost.js
β β βββ User.js
β β
β βββ node_modules/
β βββ server.js
β βββ package.json
β βββ .env (you must manually create)
β
β
βββ src/
β βββ components/
β β βββ CTA.jsx
β β βββ Features.jsx
β β βββ Footer.jsx
β β βββ Hero.jsx
β β βββ Logo.jsx
β β βββ Navbar.jsx
β β βββ Testimonials.jsx
β β
β βββ pages/
β β βββ Dashboard/
β β β βββ Analytics.jsx
β β β βββ Community.jsx
β β β βββ Dashboard.jsx
β β β βββ HabitCard.jsx
β β β βββ MoodTracker.jsx
β β β βββ MyHabits.jsx
β β β βββ QuickNote.jsx
β β β βββ Settings.jsx
β β β βββ Sidebar.jsx
β β β βββ StreakCard.jsx
β β β βββ Topbar.jsx
β β β βββ WeeklyChart.jsx
β β β βββ Landing.jsx
β β βββ Login.jsx
β β βββ Signup.jsx
β β
β βββ utils/
β β βββ apiClient.js
β β βββ moodStorage.js
β β
β βββ App.jsx
β βββ main.jsx
β βββ index.css
β
βββ package.json
βββ vite.config.js
βββ README.md
Habitrix has two separate environments:
- π one for the backend
- π one for the frontend
Follow the steps below π
git clone https://github.com/Adii-45/Habit_tracker_OJT
cd Habit_tracker_OJTNavigate to the backend folder:
cd Backend
npm installYour .env file should contain:
MONGO_URL=your_mongodb_connection_string
PORT=5000
npm run devYour backend runs on:
π http://localhost:5000
Go back to the main project folder and run:
cd ..
npm install
npm run devYour frontend runs on:
π http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/signup |
Register user |
| POST | /auth/login |
Login user |
| POST | /habits |
Create new habit |
| GET | /habits |
Get all habits |
| PUT | /habits/:id |
Update habit |
| DELETE | /habits/:id |
Delete habit |
| POST | /moods |
Log daily mood |
| GET | /moods |
Mood history |
- Mobile app version (Flutter / React Native)
- Pomodoro timer
- Calendar-based analytics
- AI habit suggestions
- Community leaderboard
Aditya Kumar Nayak & Yatin Jamwal
Polaris School of Technology
OJT Project - Backend Developer Associate
GitHub: https://github.com/Adii-45 & https://github.com/YATIN072007/