An open API service indexing awesome lists of open source software.

https://github.com/github-main-user/quick-habit

๐Ÿง  A minimalistic habit tracker backend inspired by Atomic Habits. Includes Telegram reminders, Docker setup, Celery tasks, and full API support.
https://github.com/github-main-user/quick-habit

celery celerybeat django django-rest-framework docker docker-compose postgresql redis

Last synced: 9 months ago
JSON representation

๐Ÿง  A minimalistic habit tracker backend inspired by Atomic Habits. Includes Telegram reminders, Docker setup, Celery tasks, and full API support.

Awesome Lists containing this project

README

          

# Quick Habit

Quick Habit is a simple habit tracker backend inspired by the book *Atomic Habits* by James Clear. It helps users build and maintain healthy routines with the support of Telegram reminders.

## ๐Ÿš€ Features

- Track both helpful and pleasant habits
- Link pleasant habits as rewards for completing helpful ones
- Daily/weekly habit scheduling
- Telegram integration for habit reminders
- JWT authentication
- Pagination, access control, validation rules
- Background task handling via Celery & Redis
- Scheduling tasks via Celery Beat
- Dockerized for easy deployment

## ๐Ÿงฑ Tech Stack

- Python 3.13
- Django 5+
- Django REST Framework
- PostgreSQL
- Redis
- Celery + Celery Beat
- Docker & Docker Compose

## ๐Ÿ“ฆ Installation

### 1. Clone the repo

```bash
git clone https://github.com/yourusername/quick-habit.git
cd quick-habit
````

### 2. Create `.env` file

Copy `.env.example` to `.env` and configure your variables:

```bash
cp .env.example .env
```

### 3. Build and run with Docker

```bash
docker-compose up --build
```

App will be available at `http://localhost:8000`

## ๐Ÿงช Running Tests

```bash
docker-compose run web python manage.py test
```

## ๐Ÿ“ฌ Telegram Integration

The app sends habit reminders via Telegram. To enable:

1. Create a Telegram bot via BotFather
2. Save the bot token in your `.env`
3. Link your user with a `chat_id`
4. Celery will handle sending reminders on schedule

## ๐Ÿ“š API Documentation

Auto-generated Swagger/Redoc API documentation available at:

```
http://localhost:8000/api/docs/
http://localhost:8000/api/redoc/
```