Sign inSign up

omikalix/campuscore-api

By omikalix

•Updated 4 months ago

A lightweight Student Management REST API built with FastAPI, PostgreSQL, SQLAlchemy, and Pydantic.

Image
API management
Web servers
Databases & storage
1

143

omikalix/campuscore-api repository overview

ā šŸŽ“ CampusCore API

šŸ”— Live API: https://campuscore-api.onrender.com⁠

šŸ“– API Documentation: https://campuscore-api.onrender.com/docs⁠

šŸ“š ReDoc Documentation: https://campuscore-api.onrender.com/redoc⁠

🐳 Docker Hub: https://hub.docker.com/r/omikalix/campuscore-api⁠

šŸ’» GitHub Repository: https://github.com/OMI-KALIX/campuscore-api⁠


⁠Getting Started

  1. Open the API documentation link.
  2. Test the available endpoints using Swagger UI.
  3. Create, retrieve, update, and delete student records.
  4. Use the /seed endpoint to populate sample data.

⁠Note

The backend is hosted on Render and may enter a sleep state after periods of inactivity.

The first request may take a little longer while the server wakes up. Once initialized, the application should respond normally.


A containerized Student Management REST API built with FastAPI, PostgreSQL, SQLAlchemy, and Pydantic.

This project demonstrates CRUD operations, database integration, API development, Docker containerization, and cloud deployment using modern backend technologies.


⁠Docker Image

This Docker image contains the complete FastAPI application and is configured to work with any PostgreSQL-compatible database through environment variables.


⁠Run Container

⁠Local PostgreSQL
docker run -p 8000:8000 -e DATABASE_URL="postgresql://username:[email protected]:5432/students1" omikalix/campuscore-api
⁠Render PostgreSQL
docker run -p 8000:8000 -e DATABASE_URL="<your_render_postgresql_connection_string>" omikalix/campuscore-api

⁠After Starting the Container

⁠API
http://127.0.0.1:8000
⁠Swagger UI
http://127.0.0.1:8000/docs
⁠ReDoc
http://127.0.0.1:8000/redoc

⁠Important

The application listens on:

0.0.0.0:8000

inside the container to allow external access.

Access the application from the host machine using:

http://localhost:8000

or

http://127.0.0.1:8000

⁠Database Configuration

The application reads the database connection dynamically from:

DATABASE_URL

This allows the same Docker image to work with:

  • Local PostgreSQL
  • Render PostgreSQL
  • Railway PostgreSQL
  • AWS RDS
  • Azure PostgreSQL
  • Any PostgreSQL-compatible database

without rebuilding the image.


⁠Features

  • Student CRUD Operations
  • FastAPI REST API
  • PostgreSQL Integration
  • SQLAlchemy ORM
  • Pydantic Validation
  • Interactive Swagger Documentation
  • Dockerized Deployment
  • Render Deployment Support
  • Environment-Based Configuration
  • Seed Sample Data

⁠Tech Stack

  • Python
  • FastAPI
  • PostgreSQL
  • SQLAlchemy
  • Pydantic
  • Uvicorn
  • Docker

⁠Included Components

  • FastAPI Backend
  • PostgreSQL Integration
  • SQLAlchemy Models
  • Pydantic Schemas
  • CRUD Endpoints
  • Docker Configuration
  • Render Deployment Support

⁠Use Cases

  • Student Record Management
  • FastAPI Learning
  • SQLAlchemy ORM Practice
  • PostgreSQL Integration
  • Docker Containerization
  • REST API Development
  • Backend Portfolio Projects

⁠Author

OMI-KALIX

Tag summary

Content type

Image

Digest

sha256:2bc0f769f…

Size

60.4 MB

Last updated

4 months ago

docker pull omikalix/campuscore-api