Lagbjorn /
comments_for_strategia
REST API на Django для системы комментариев блога. Тестовое задание для Strategia
30/100 healthLoading repository data…
Gontarenok / repository
REST API системы учёта складских остатков. Стек: Python 3.11, FastAPI, SQLAlchemy 2.0 async, asyncpg/PostgreSQL, Alembic, Pydantic v2, JWT-авторизация с role-based access (admin/manager/viewer). Модели: User, Supplier, Warehouse, Product, StockLevel, Movement. Бизнес-логика: создание Movement автоматически апдейтит StockLevel. Swagger UI на /docs с
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
REST API for warehouse stock accounting built with FastAPI, SQLAlchemy 2.0 (async), PostgreSQL, and JWT authentication.
cp .env.example .env
docker compose up --build
API: http://localhost:8000
Swagger: http://localhost:8000/docs
ReDoc: http://localhost:8000/redoc
Migrations run automatically on container start (alembic upgrade head).
poetry install
cp .env.example .env
# Start PostgreSQL and set DATABASE_URL in .env
poetry run alembic upgrade head
poetry run uvicorn app.main:app --reload
poetry run alembic upgrade head
poetry run alembic revision --autogenerate -m "description"
poetry run pytest -v
Tests use an in-memory SQLite database with pytest fixtures (see tests/conftest.py).
POST /auth/register — create user (role viewer)POST /auth/login — get JWTAuthorization: Bearer <token> for protected routesPOST /api/suppliers/ — admin/managerPOST /api/warehouses/ — admin onlyPOST /api/products/ — admin/managerPOST /api/movements/ with "type": "in" — updates stockGET /api/stock/?warehouse_id=1&product_id=1 — verify quantityFor admin/manager actions in development, promote a user in the database:
UPDATE users SET role = 'admin' WHERE email = 'you@example.com';
Selected from shared topics, language and repository description—not editorial ratings.
Lagbjorn /
REST API на Django для системы комментариев блога. Тестовое задание для Strategia
30/100 healthAlexeyTeacher /
Api на django по тестовому заданию. Задание: реализовать REST API для системы комментариев блога
29/100 healthraidzin /
Программа для нахождения состояний равновесия динамической системы c веб интерфейсом и REST API.
| Role | Permissions |
|---|---|
| viewer | Read stock, movements, suppliers, products, warehouses |
| manager | CRUD suppliers/products, create movements |
| admin | All manager permissions + create warehouses |
render.yaml or add Web Service + PostgreSQL manually.JWT_SECRET from blueprint).DATABASE_URL uses async driver — the app auto-converts postgres:// to postgresql+asyncpg://.Free PostgreSQL on Render is limited to 90 days for newly created databases (Render policy). After expiration you must upgrade or migrate data to another database. Plan accordingly for production demos.
render.yaml defines:
warehouse-api): Docker runtime, free plan, autoDeploy: true, health check /healthwarehouse-db): free planalembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port $PORTSee .env.example:
| Variable | Description |
|---|---|
DATABASE_URL | Async PostgreSQL URL (postgresql+asyncpg://...) |
JWT_SECRET | Secret for signing tokens |
JWT_ALGORITHM | Default HS256 |
JWT_EXPIRE_MINUTES | Token lifetime (default 60) |
If Render free tier returns 402 (service limit), use Fly.io instead. The repo includes .github/workflows/deploy-fly.yml.
flyctl.flyctl postgres create --name portfolio-warehouse-db --region amsFLY_API_TOKEN — from Fly access tokensJWT_SECRET — any long random stringDATABASE_URL — PostgreSQL URL (required if not using flyctl postgres attach)main or run the workflow manually (Actions → Deploy to Fly.io → Run workflow).Live URL after deploy: https://portfolio-warehouse-api.fly.dev (Swagger: /docs).
For local deploy with flyctl deploy, see fly.toml.
MIT