A simple RESTful API for tracking user habits, logging daily completions, and maintaining streaks (consecutive days completed).
Built with Node.js, Express, and MongoDB.
- 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
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