Hackathon Dashboard is a full-stack application for discovering hackathons, publishing projects, managing teams, and handling user activity such as comments, votes, notifications, and reports.
The repository currently contains:
- A Nuxt 4 frontend in
frontend3/ - A FastAPI backend in
backend/ - Docker assets for local multi-service development
- Alembic migrations for backend schema changes
- Nuxt 4
- Vue 3
- TypeScript
- Pinia
- Tailwind CSS
@nuxtjs/i18n- Vitest
Primary frontend manifest:
frontend3/package.json
Primary frontend config:
frontend3/nuxt.config.tsfrontend3/eslint.config.mjsfrontend3/vitest.config.ts
- FastAPI
- SQLAlchemy
- Alembic
- Pydantic Settings
- JWT / cookie-based auth
- SQLite by default, PostgreSQL supported and used in Docker Compose
Primary backend bootstrap and config:
backend/app/main.pybackend/app/core/config.pybackend/app/core/database.pybackend/requirements.txtbackend/alembic.ini
hackathon-dashboard/
├── backend/
│ ├── app/
│ │ ├── api/v1/ # FastAPI route modules
│ │ ├── core/ # Settings, auth, database, permissions
│ │ ├── domain/ # SQLAlchemy models and Pydantic schemas
│ │ ├── i18n/ # Localization middleware and helpers
│ │ ├── repositories/ # Data access layer
│ │ ├── services/ # Business logic
│ │ └── utils/ # Supporting helpers
│ ├── migrations/ # Alembic migrations
│ ├── templates/ # Email templates
│ ├── test_*.py # Backend tests and scripts
│ ├── requirements.txt
│ └── Dockerfile
├── frontend3/
│ ├── app/
│ │ ├── app.vue # Global app shell
│ │ ├── assets/
│ │ ├── components/ # Atomic and feature UI components
│ │ ├── composables/ # Frontend feature logic and API access
│ │ ├── middleware/ # Route/auth middleware
│ │ ├── pages/ # Nuxt file-based routes
│ │ ├── plugins/
│ │ ├── stores/ # Pinia stores
│ │ ├── types/
│ │ └── utils/ # API client and helpers
│ ├── i18n/
│ ├── public/
│ ├── tests/
│ ├── package.json
│ ├── pnpm-lock.yaml
│ └── Dockerfile
├── docker-compose.yml
└── README.md
The frontend is organized around Nuxt pages, Pinia stores, and composables.
frontend3/app/app.vuedefines the global shell with header, sidebar, footer, mobile navigation, and notification mounting.frontend3/app/pages/contains route-level screens such as projects, hackathons, teams, notifications, settings, admin, and auth flows.frontend3/app/composables/is the main feature layer for client-side domain logic. This is where project, team, notification, report, auth, and hackathon operations are wrapped.frontend3/app/stores/holds shared state such as auth, UI notifications, teams, theme, preferences, and voting.frontend3/app/utils/api-client.tsis the central HTTP abstraction used by the composables and stores.frontend3/app/middleware/auth.global.tsandfrontend3/app/middleware/auth.tsenforce authentication-aware routing.
In practice, most frontend changes are made in:
frontend3/app/pages/...frontend3/app/composables/...frontend3/app/stores/...frontend3/app/components/...
The backend follows a layered package layout.
backend/app/main.pycreates the FastAPI app, applies middleware, mounts uploads, and includes all API routers.backend/app/api/v1/contains route modules grouped by feature.backend/app/services/contains business logic.backend/app/repositories/contains data access code.backend/app/domain/models/contains SQLAlchemy models.backend/app/domain/schemas/contains request and response schemas.backend/app/core/contains configuration, auth, database setup, and permission helpers.backend/app/i18n/contains localization middleware and translation helpers.
Most backend feature work flows through:
backend/app/api/v1/<feature>/routes.pybackend/app/services/<feature>_service.pybackend/app/repositories/<feature>_repository.pybackend/app/domain/models/...andbackend/app/domain/schemas/...
The repo currently has meaningful functionality in these areas:
- Authentication: email/password, GitHub OAuth, Google OAuth, refresh tokens, 2FA
- Projects: CRUD, voting, comments, reporting, engagement stats
- Hackathons: list/detail flows plus related project and report screens
- Teams: creation, membership, invitations, team reports
- Notifications: in-app preferences, registry, delivery, push support, email templates
- User settings and admin user management
Backend router entrypoints are collected in:
backend/app/main.py
Some of the most central backend route files are:
backend/app/api/v1/auth/routes.pybackend/app/api/v1/projects/routes.pybackend/app/api/v1/hackathons/routes.pybackend/app/api/v1/teams/routes.pybackend/app/api/v1/notifications/routes.pybackend/app/api/v1/team_reports/routes.pybackend/app/api/v1/reports/routes.py
Some of the most central frontend files are:
frontend3/app/app.vuefrontend3/app/stores/auth.tsfrontend3/app/composables/useProjects.tsfrontend3/app/composables/useTeams.tsfrontend3/app/composables/useNotifications.tsfrontend3/app/utils/api-client.ts
- Python 3.12 recommended for the backend
- Node.js 20 recommended for the frontend
pnpmfor frontend package management- PostgreSQL if you want to mirror the Docker setup locally
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtCreate a .env file in backend/ with at least the values you need for your environment. The backend reads settings from:
backend/app/core/config.py
Common variables include:
DATABASE_URLSECRET_KEYDEBUGGITHUB_CLIENT_IDGITHUB_CLIENT_SECRETGITHUB_CALLBACK_URLGOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRETGOOGLE_CALLBACK_URLFRONTEND_URLVAPID_PUBLIC_KEYVAPID_PRIVATE_KEY
Run database migrations:
cd backend
alembic upgrade headRun the API locally:
cd backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend3
pnpm installCreate a frontend .env file if needed. The main runtime variable is:
NUXT_PUBLIC_API_URL
Run the frontend locally:
cd frontend3
pnpm devThe frontend config is in:
frontend3/nuxt.config.ts
Docker Compose is available at:
docker-compose.yml
It defines:
backendfrontenddb(PostgreSQL 15)
Typical usage:
docker compose up --buildLint:
cd frontend3
pnpm lintBuild:
cd frontend3
pnpm buildVitest is configured, but there is currently no explicit test script in frontend3/package.json. You can run it directly:
cd frontend3
pnpm exec vitestRelevant files:
frontend3/vitest.config.tsfrontend3/tests/setup.ts
The backend has multiple test files in backend/, including both unittest-style and pytest-style tests, but there is no single repo-level pytest configuration file.
Examples:
backend/test_notification_api.pybackend/test_notification_email_templates.pybackend/test_rbac_team_reports.py
Run a backend test file explicitly, for example:
cd backend
python -m pytest test_notification_email_templates.pyor:
cd backend
python test_rbac_team_reports.pyAlembic configuration lives in:
backend/alembic.inibackend/migrations/env.py
Common commands:
cd backend
alembic upgrade head
alembic downgrade -1
alembic historyThere is additional migration documentation in:
backend/README_ALEMBIC.md
Uploaded files are exposed by the backend under /static/uploads and are backed by:
backend/uploads/
Email templates live in:
backend/templates/emails/
These templates are tied into the notification and email orchestration services under:
backend/app/services/backend/app/utils/template_registry.py
- The backend README references in older documentation may describe a flatter structure that no longer matches the code. The active backend code is under
backend/app/. - Frontend business logic is concentrated in composables and stores rather than in page files alone.
- The notifications, teams, reports, and auth flows are substantial subsystems and are likely to be touched by cross-cutting changes.
backend/app/main.pybackend/app/core/config.pybackend/app/core/database.pybackend/app/api/v1/backend/app/services/backend/app/repositories/backend/app/domain/models/frontend3/nuxt.config.tsfrontend3/app/app.vuefrontend3/app/pages/frontend3/app/composables/frontend3/app/stores/frontend3/app/utils/api-client.ts