Skip to content

YATIN072007/Habit_tracker_UI_OJT

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Habitrix β€” MERN Habit Tracking Web App

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.


🌟 Features

User Authentication

  • Secure signup & login
  • JWT-based authentication
  • Separate data for each user

Habit Management

  • Add, edit, delete habits
  • Mark habits daily
  • Track streaks & consistency
  • Organized "My Habits" page

Analytics Dashboard

  • Built using Recharts
  • Weekly / monthly analytics
  • Line charts, bar charts, streak data
  • Understand consistency visually

Mood Tracker

  • Daily mood logging
  • View mood patterns
  • Simple & intuitive UI

Dashboard

  • Shows all today's habits
  • Quick progress overview

Community Page (UI)

  • Placeholder page for future community features

Settings Page

  • Profile settings (basic UI)
  • Logout

Fully Responsive

  • Works smoothly on all screen sizes

πŸ› οΈ Tech Stack

Frontend

  • React.js
  • React Router
  • Recharts
  • CSS / Tailwind (depending on your folder setup)

Backend

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • JWT Authentication
  • Dotenv

Tools

  • VS Code
  • Git & GitHub
  • Postman
  • Vite

πŸ“‚ Folder Structure

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

βš™οΈ Installation & Setup Guide

Habitrix has two separate environments:

  • πŸ“Œ one for the backend
  • πŸ“Œ one for the frontend

Follow the steps below πŸ‘‡


1. Clone the Repository

git clone https://github.com/Adii-45/Habit_tracker_OJT
cd Habit_tracker_OJT

πŸ”§ Backend Setup

Navigate to the backend folder:

cd Backend
npm install

πŸ“ Create a .env file inside /Backend

Your .env file should contain:

MONGO_URL=your_mongodb_connection_string
PORT=5000

▢️ Run the backend server

npm run dev

Your backend runs on:
πŸ‘‰ http://localhost:5000


🎨 Frontend Setup

Go back to the main project folder and run:

cd ..
npm install
npm run dev

Your frontend runs on:
πŸ‘‰ http://localhost:5173


πŸ§ͺ Testing the App

API Endpoints (Backend)

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

πŸ“Έ Screenshots

Landing Page

Screenshot 2025-12-04 at 10 13 00β€―AM

Dashboard

Screenshot 2025-12-04 at 10 14 01β€―AM

My Habits

Screenshot 2025-12-04 at 10 14 25β€―AM

Analytics

Screenshot 2025-12-04 at 10 14 50β€―AM

Mood Tracker

Screenshot 2025-12-04 at 10 15 15β€―AM

πŸš€ Future Enhancements

  • Mobile app version (Flutter / React Native)
  • Pomodoro timer
  • Calendar-based analytics
  • AI habit suggestions
  • Community leaderboard

πŸ‘¨β€πŸ’» Author

Aditya Kumar Nayak & Yatin Jamwal
Polaris School of Technology
OJT Project - Backend Developer Associate

GitHub: https://github.com/Adii-45 & https://github.com/YATIN072007/


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 99.7%
  • Other 0.3%