Files
resumeformatter/backend

Profile Linker API

This is a FastAPI backend for the Profile Linker application. It provides API endpoints for managing a list of people's profiles.

Project Structure

The project follows a modular structure:

backend/
├── app/
│   ├── api/                 # API endpoints
│   │   ├── endpoints/       # API endpoint modules
│   │   └── api.py           # API router
│   ├── core/                # Core application components
│   │   └── config.py        # Application settings
│   ├── crud/                # CRUD operations
│   │   └── person.py        # Person CRUD operations
│   ├── db/                  # Database components
│   │   ├── base.py          # Database base
│   │   ├── base_class.py    # Base class for database models
│   │   └── session.py       # Database session
│   ├── models/              # Database models
│   │   └── person.py        # Person model
│   ├── schemas/             # Pydantic schemas
│   │   └── person.py        # Person schemas
│   └── main.py              # FastAPI application
├── main.py                  # Entry point
└── requirements.txt         # Python dependencies

API Endpoints

The API provides the following endpoints:

  • GET /api/people: Get all people
  • POST /api/people: Create a new person

Development

Prerequisites

  • Python 3.11+
  • Docker and Docker Compose

Running the Application

Using Docker Compose

  1. Build and start the containers:
docker-compose up --build
  1. Access the API at http://localhost:8080/api
  2. Access the API documentation at http://localhost:8080/docs

Running Locally

  1. Install dependencies:
cd backend
pip install -r requirements.txt
  1. Run the application:
cd backend
python main.py
  1. Access the API at http://localhost:8080/api
  2. Access the API documentation at http://localhost:8080/docs

Frontend Integration

The backend serves the frontend as static assets. The frontend should be built and placed in the dist directory. The Docker setup handles this automatically.