A simple, secure, and scalable REST API. It was developed to keep records of Clans. Built on FastAPI + PostgreSQL + GCP (Cloud Run & Cloud SQL) infrastructure.
GET/clans
: Lists all clansPOST/clans
: Creates a new clan record- Swagger UI automatically integrated (
/docs
) - Publicly accessible via Cloud Run
- Cloud SQL (PostgreSQL) database connection
- Long data entries are blocked through middleware
- Container build is done via GCP Artifact Registry
DATABASE_URL=postgresql://<username>:<password>@<host>:<port>/<db_name>
docker build -t gcr.io/<PROJECT_ID>/clans-api .
docker push gcr.io/<PROJECT_ID>/clans-api
gcloud run deploy clans-api \
--image gcr.io/<PROJECT_ID>/clans-api \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--update-env-vars DATABASE_URL=postgresql://<username>:<password>@<host>:<port>/<db_name>
Swagger UI:
https://<YOUR_CLOUD_RUN_URL>/docs
- Maximum length are set for
type
vename
fields. - Very long bodies are rejected by middleware.
- Auth, rate limiting, etc. can be easily integrated in the future.
Talha Murat Çamlı
LinkedIn
📍 Powered by FastAPI & GCP