Skip to content

It is built with a modern Python stack, leveraging FastAPI for high-performance and asynchronous request handling, and SQLModel for type-safe, intuitive database interactions with a PostgreSQL backend. The API provides a comprehensive set of features for user management, post creation, and engagement, all secured with OAuth2 authentication.

License

Notifications You must be signed in to change notification settings

adcondev/yalemi-api

Repository files navigation

Yalemi API

Project Logo

Yet Another Learning Experience Made In Python.

A robust Social Media REST API built with FastAPI, SQLModel, and PostgreSQL. This project demonstrates a scalable backend architecture featuring user authentication, content management, and interaction systems.

Python Version FastAPI License Build Status

🏗️ Architecture

graph TD
    Client[Client Application] -->|HTTP / JSON| API[FastAPI Gateway]
    
    subgraph "Application Layer"
        API --> Auth[Auth Router]
        API --> User[User Router]
        API --> May["May (Post) Router"]
        API --> Vote[Vote Router]
    end
    
    subgraph "Data Layer"
        Auth --> ORM[SQLModel ORM]
        User --> ORM
        May --> ORM
        Vote --> ORM
        ORM --> DB[(PostgreSQL Database)]
    end
Loading

🚀 Features

  • User Management: Registration, profile updates, and secure password handling.
  • Authentication: JWT-based OAuth2 authentication flow.
  • Content System: Create, read, and manage "Mays" (posts).
  • Voting System: Upvote/downvote functionality with duplicate prevention.
  • Documentation: Auto-generated Swagger UI and ReDoc.

🛠️ Installation

  1. Clone the repository

    git clone https://github.com/adcondev/yalemi-api.git
    cd yalemi-api
  2. Create a virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Environment Configuration Copy .env.example to .env and update the values:

    cp .env.example .env

    Make sure you have a PostgreSQL instance running and accessible.

🏃 Usage

Start the development server:

uvicorn app.main:app --reload

The API will be available at http://localhost:8000.

  • Interactive Docs (Swagger UI): http://localhost:8000/docs
  • Alternative Docs (ReDoc): http://localhost:8000/redoc

🤝 Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

It is built with a modern Python stack, leveraging FastAPI for high-performance and asynchronous request handling, and SQLModel for type-safe, intuitive database interactions with a PostgreSQL backend. The API provides a comprehensive set of features for user management, post creation, and engagement, all secured with OAuth2 authentication.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages