OpenClaw Agent dc17802d74 TASK-001: Setup FastAPI project structure
- Fixed main.py to include all route routers (posts, users, comments, feed)
- Renamed app/models.py to app/schemas.py and split into proper schema modules
- Fixed schema imports in routes
- Updated app/models/__init__.py to properly export SQLAlchemy models
- Fixed database imports in route files
- App imports and runs correctly
2026-04-16 13:30:35 +00:00

Instagram Clone API

A FastAPI-based Instagram clone API with SQLAlchemy 2.0 and Alembic migrations.

Tech Stack

  • Framework: FastAPI 0.109+
  • ORM: SQLAlchemy 2.0
  • Database: SQLite (dev), PostgreSQL (prod)
  • Migrations: Alembic
  • Testing: pytest + httpx

Project Structure

instagram-clone/
├── app/
│   ├── api/
│   │   ├── endpoints/    # API route handlers
│   │   └── dependencies/ # FastAPI dependencies
│   ├── core/            # Configuration and settings
│   ├── db/              # Database connection and models
│   ├── models/          # SQLAlchemy models
│   ├── schemas/         # Pydantic schemas
│   ├── services/        # Business logic
│   └── utils/           # Utility functions
├── alembic/             # Database migrations
├── tests/
│   ├── unit/           # Unit tests
│   └── integration/     # Integration tests
├── pyproject.toml
└── alembic.ini

Setup

# Install dependencies
pip install -e ".[dev]"

# Run database migrations
alembic upgrade head

# Run the application
uvicorn app.main:app --reload

Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=app tests/

API Documentation

Once running, visit:

Description
No description provided
Readme 77 KiB
Languages
Markdown 100%