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

https://github.com/chilleco/web

Template Full Stack Web Application
https://github.com/chilleco/web

full-stack js python template web webapp

Last synced: about 2 months ago
JSON representation

Template Full Stack Web Application

Awesome Lists containing this project

README

          

# Template Web App
Modern full-stack web application with Python FastAPI backend, Next.js frontend, Telegram bot, and Telegram / VK / MAX Mini App support. Built with Docker containers and featuring multilingual support, and production-ready flow.

## Background tasks (Taskiq)
- Worker: `uv run taskiq worker tasks.broker:broker tasks.registry`
- Scheduler: `uv run taskiq scheduler tasks.scheduler:scheduler tasks.registry`
- Fixed-delay periodic jobs (cycle after finish): trigger once, e.g. `await run_periodic.kiq("cache_categories")`

## Observability
- Sentry (API/TG): set `SENTRY_DSN` (optional: `SENTRY_TRACES_SAMPLE_RATE`, `SENTRY_PROFILES_SAMPLE_RATE`, `SENTRY_SEND_DEFAULT_PII`).
- Sentry (Web): set `NEXT_PUBLIC_SENTRY_DSN` (and optionally `NEXT_PUBLIC_SENTRY_RELEASE`, `NEXT_PUBLIC_SENTRY_TRACES_SAMPLE_RATE`, `NEXT_PUBLIC_SENTRY_PROFILES_SAMPLE_RATE`).
- Logging (Swarm): containers log JSON to stdout/stderr only (no files). Required fields: `service`, `env`, `version`, `level`, `trace_id`/`request_id`, `msg`, `error.stack` (if present). Use labels only for low-cardinality values (service, stack, env, node, level); keep `request_id`, `user_id`, `ip`, `url` in JSON fields.
- API/TG logging path is unified via Loguru: the same log records feed JSON stdout (Alloy -> Loki -> Grafana), errors/critical events to Sentry, and Telegram alerts when `silent=False` (default for `log.important(...)`).

## Run
[Before starting, you can learn how to configure the server →](https://github.com/kosyachniy/dev/blob/main/server/SERVER.md)



local
prod





1. Configure .env from .env.example and add:


# Type
# local / test / dev / pre / prod
ENV=local

\# Links
PROTOCOL=http
EXTERNAL_HOST=localhost
EXTERNAL_PORT=80
DATA_PATH=./data




1. Configure CI/CD variables/secrets (GitHub Actions vars+secrets or GitLab CI/CD variables).
Fill all keys from .env.example in CI variables/secrets.




2. make up


2. make release




3. Open ` http://localhost/ `


3. Open ` https://web.chill.services/ ` (your link)


Use `make down` to stop services.

## Telegram bot (webhooks)
- Service lives in `tg/` and runs a FastAPI webhook handler behind `/tg/`.
- Required env: `TG_TOKEN` (bot token) and `TG` (public webhook URL like `https://host/tg/`).
- Optional env: `TG_SECRET` (webhook secret header).
- `/start` payload is treated as `utm` and forwarded to auth; the bot replies with a WebApp button to open the Mini App.
- Bot message localization lives in `tg/messages/*.json` (en/ru/zh/es/ar).