Skip to content
utkarshkgithubPublic

About

This project is a simple cloud-native blog application built with Python and Flask, using a PostgreSQL database. It allows users to view and create blog posts, and includes health check and metrics endpoints. The initial posts cover various DevOps and cloud technology topics.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Kue

Kue is a cloud-native writing journal with a Flask JSON API and a Vite + React frontend. Flask owns persistence and API behavior; React owns every screen and interaction. There are no Flask templates or server-rendered pages.

Architecture

  • app.py: Flask API backed by Postgres
  • frontend/: Vite + React single-page application
  • schema.sql, init_db.py, seed.py: database setup and sample content
  • infrastructure/: Terraform for AWS/EKS
  • k8s/: Kubernetes manifests

The API is available under /api:

  • GET /api/posts?q=&page=: paginated search
  • POST /api/posts: create a post
  • GET /api/posts/<id> and GET /api/posts/slug/<slug>: read a post
  • PUT /api/posts/<id>: update a post
  • DELETE /api/posts/<id>: delete a post
  • GET /api/about: about page content
  • GET /healthz and GET /metrics: operational endpoints

Local development

Start the Flask API from the repository root:

python app.py

In a second terminal, install and start the frontend:

cd frontend
npm install
npm run dev

Open http://localhost:5173. Vite proxies API requests to http://localhost:8080. Set VITE_API_URL when the frontend and backend are deployed at different origins.

The backend reads either DATABASE_URL or the individual PG* environment variables. Copy .env.example to .env and fill in local values. Never commit .env.

Tests and builds

pytest -q
cd frontend && npm run build

Containers

Build the API image from the repository root:

docker build -t kue-api .

Build the frontend image from frontend/:

cd frontend
docker build --build-arg VITE_API_URL=https://api.example.com -t kue-frontend .

The infrastructure and Kubernetes files remain available for deploying the two services independently.

License

This project is licensed under the MIT License.

About

This project is a simple cloud-native blog application built with Python and Flask, using a PostgreSQL database. It allows users to view and create blog posts, and includes health check and metrics endpoints. The initial posts cover various DevOps and cloud technology topics.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages