feat(root): add project management features and dependencies

Add Kanban board, epics, notifications, external sharing, and related API endpoints; update README and install required packages such as django‑q2, openpyxl, and others.
This commit is contained in:
sankalp committed 2026-06-28 14:15:00 +05:45
1 parent ed1d6c66c8
commit 9d5ebcfcde
5 files changed
+616 -90

No files matched your search

+156 -85
View File
@@ -1,112 +1,183 @@
# config
# Project Management
A Django project folder structure is generated with [djinitx/djinit/dj](https://github.com/S4NKALP/djinit).
A full-featured Django project management tool with Kanban boards, ticket tracking, epics, notifications, and external access sharing.
## Tech Stack
- **Backend** — Django 6, Django REST Framework, JWT Auth
- **Frontend** — HTMX, Tailwind CSS v4 (via django-tailwind-cli)
- **Database** — SQLite (dev) / MySQL (prod)
- **Task Queue** — Django Q2
- **API Docs** — drf-spectacular (Swagger UI)
- **Package Manager** — [uv](https://github.com/astral-sh/uv)
---
## Features
- Modern project structure with environment-specific settings
- Pre-configured REST API with JWT authentication
- Essential dependencies and utilities
- Production-ready configuration
- **Projects** — create, manage, pin projects with colour labels and member roles
- **Tickets** — full CRUD, bulk ops, Excel import/export, priority & status management
- ️ **Epics** — group tickets into epics with progress tracking
- ️ **Kanban Board** — drag-and-drop ticket status columns per project
- **Notifications** — in-app + email notifications on ticket events
- **User Management** — role-based access (superadmin / manager / member)
- **External Access** — share a read-only dashboard link with external users via a token
- **Project Notes** — attach notes to projects
- **Google OAuth** — sign in with Google
- **Dark / Light Mode** — per-user UI preferences
## Setup
---
### Using Just (Recommended)
## Quick Start
1. Set environment variables in `.env` file
### 1. Clone & install
2. Run setup (installs dependencies, runs migrations, creates superuser):
```bash
just setup
```
```bash
git clone https://github.com/S4NKALP/project-managment.git
cd project-managment
uv sync
```
3. Start development server:
```bash
just dev
```
### 2. Configure environment
### Traditional Method
```bash
cp .env.sample .env
# Edit .env with your values
```
1. Install dependencies:
```bash
pip install -r requirements.txt
```
Required `.env` keys:
2. Set environment variables in `.env` file
```ini
DJANGO_SETTINGS_MODULE=config.settings.development
SECRET_KEY=your-secret-key
BASE_URL=http://localhost:8000
SITE_NAME=Project Management
3. Run migrations:
```bash
python manage.py migrate
```
# Google OAuth (optional)
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=http://localhost:8000/api/auth/google/callback/
```
4. Create superuser:
```bash
python manage.py createsuperuser
```
### 3. Run migrations & create superuser
5. Start development server:
```bash
python manage.py runserver
```
```bash
uv run python manage.py migrate
uv run python manage.py createsuperuser
```
## Available Commands
### 4. Start development server
Run `just` to see all available commands, including:
```bash
uv run python manage.py runserver
```
- `just dev` - Run development server
- `just migrate` - Run migrations
- `just makemigrations` - Create migrations
- `just createsuperuser` - Create superuser
- `just test` - Run tests
- `just lint` - Lint code
- `just format` - Format code
- `just shell` - Django shell
- `just clean` - Clean cache files
- `just install <package>` - Install package
- `just remove <package>` - Remove package
- `just server` - Run production server
- `just ci` - Run all linting and checks
- `just test-coverage` - Run tests with coverage
Visit **http://localhost:8000** → redirects to the dashboard automatically.
---
## Using `just` (Recommended)
Install [just](https://github.com/casey/just), then:
```bash
just setup # install deps + migrate + createsuperuser
just dev # run dev server
just migrate # run migrations
just test # run tests
just lint # ruff lint
just format # ruff format
just ci # lint + format check + django check
```
Run `just` with no arguments to see all available commands.
---
## Project Structure
```
config/
├── config/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ ├── admin/
│ ├── api/ # API endpoints organized by model
│ │ ├── user/ # Example: if you have a User model
│ │ │ ├── views.py
│ │ │ ├── serializers.py
│ │ │ └── urls.py
│ │ └── urls.py
│ ├── models/ # Django models
│ ├── tests/
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
project-managment/
├── config/ # Django config package
│ ├── settings/
│ │ ├── base.py # Shared settings
│ │ ├── development.py # Dev overrides (SQLite)
│ │ └── production.py # Prod overrides (MySQL)
│ ├── urls.py # Root URL conf
│ ├── wsgi.py
│ └── asgi.py
│
├── src/ # Application code
│ ├── accounts/ # User model, auth, Google OAuth
│ ├── projects/ # Projects & members (API)
│ ├── tickets/ # Tickets, statuses, priorities (API)
│ ├── epics/ # Epics
│ ├── notes/ # Project notes
│ ├── notifications/ # In-app & email notifications
│ ├── external/ # External token-based access
│ └── dashboard/ # All HTML-rendering views
│ ├── views/ # Dashboard widgets & charts
│ ├── list_views/ # Project/ticket list views
│ ├── page_views/ # CRUD page views
│ ├── board_views/ # Kanban board views
│ └── context_processors.py
│
├── templates/ # Jinja/Django HTML templates
├── static/ # Static files (CSS, JS)
├── manage.py
├── requirements.txt
├── pyproject.toml
├── uv.lock
├── .env.sample
└── README.md
**Note:** For the single folder layout, organize your API endpoints by model name under the `api/` directory.
For example, if you have a `User` model in `models/user.py`, create:
- `api/user/views.py` - API views for User
- `api/user/serializers.py` - Serializers for User
- `api/user/urls.py` - URL patterns for User endpoints
See the README files in `api/` and `models/` directories for more details.
├── pyproject.toml # Dependencies & ruff config
├── justfile # Task runner shortcuts
├── Dockerfile
├── Procfile
└── .env.sample
```
---
## API Documentation
When running in development mode, API documentation is available at:
- Swagger UI: http://localhost:8000/docs/
- Schema: http://localhost:8000/schema/
Running in development mode:
| Endpoint | Description |
|---|---|
| `http://localhost:8000/api/docs/` | Swagger UI |
| `http://localhost:8000/api/schema/` | OpenAPI schema |
### Key API routes
| Method | Endpoint | Description |
|---|---|---|
| `POST` | `/api/auth/login/` | JWT login |
| `POST` | `/api/auth/token/refresh/` | Refresh token |
| `GET/POST` | `/api/projects/` | List / create projects |
| `GET/POST` | `/api/tickets/` | List / create tickets |
| `GET/POST` | `/api/notifications/` | Notifications |
---
## CI / CD
GitHub Actions workflow (`.github/workflows/ci.yml`) runs three jobs on every push/PR to `main` and `develop`:
| Job | Steps |
|---|---|
| **Lint** | `ruff check` + `ruff format --check` |
| **Test** | Django system check → migration check → `manage.py test` |
| **Security** | `manage.py check --deploy` |
---
## Environment Variables Reference
| Variable | Default | Description |
|---|---|---|
| `DJANGO_SETTINGS_MODULE` | — | `config.settings.development` or `production` |
| `SECRET_KEY` | — | Django secret key |
| `BASE_URL` | `http://localhost:8000` | Used for email links |
| `SITE_NAME` | `Project Management` | Displayed in UI & emails |
| `GOOGLE_CLIENT_ID` | `""` | Google OAuth client ID |
| `GOOGLE_CLIENT_SECRET` | `""` | Google OAuth secret |
| `GOOGLE_REDIRECT_URI` | — | OAuth callback URL |
| `DB_NAME / DB_USER / DB_PASSWORD / DB_HOST / DB_PORT` | — | MySQL (production only) |
| `EMAIL_HOST / EMAIL_PORT / EMAIL_HOST_USER / EMAIL_HOST_PASSWORD` | — | SMTP (production only) |
| `FRONTEND_URL` | — | Allowed CORS origin (production) |