Skip to content

lakshyadeepgogoi/Habit-Tracker-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🕒 Habit Tracker API

A simple RESTful API for tracking user habits, logging daily completions, and maintaining streaks (consecutive days completed).
Built with Node.js, Express, and MongoDB.


🚀 Features

  • User registration & login (JWT authentication)
  • Create, read, update, delete habits
  • Mark habits as done for the day
  • Track last 7 days of activity
  • Calculate current streaks
  • Optional bonus:
    • Tag-based filtering
    • Reminder times
    • Pagination
    • Rate limiting per user

⚙️ Setup Instructions

1️⃣ Clone the repository

git clone https://github.com/your-username/habit-tracker.git
cd habit-tracker

### 2️⃣ Install dependencies

```bash
npm install

### 3️⃣ Set up environment variables

## Create a .env file in the root directory:

```bash
PORT=5000
MONGODB_URI=mongodb://localhost:27017/habit-tracker
JWT_SECRET=your_jwt_secret_key

### 4️⃣ Start the server

```bash
npm start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published