I am trying to create a new ai project with this prompt:
Hello Cursor! I’d like to set up the foundational elements for a new web application. Here’s a brief overview of the tech stack I have in mind:
- Backend API with FastAPI.
- Database management with SQLAlchemy and migrations handled by Alembic.
- PostgreSQL as the relational database.
- pgAdmin for database management and visualization.
- Docker for containerizing the services.
- Caddy as a reverse proxy with automatic SSL via Let’s Encrypt.
Tasks:
- FastAPI Setup:
- Create a new FastAPI application with a basic route that returns “Hello, World!”.
- SQLAlchemy & Alembic:
- Set up SQLAlchemy integration with FastAPI.
- Initialize Alembic for database migrations.
- PostgreSQL & pgAdmin:
- Define Docker configurations for both PostgreSQL and pgAdmin.
- Ensure the FastAPI application can connect to the PostgreSQL database.
- Docker Configuration:
- Create a
Dockerfile
for the FastAPI application.- Set up a
docker-compose.yml
that orchestrates the FastAPI app, PostgreSQL, pgAdmin, and Caddy.
- Caddy Setup:
- Configure Caddy as a reverse proxy to the FastAPI application.
- Set up automatic SSL for a dummy domain (like
example.com
). I’ll modify this domain later.
- Directory Structure:
- Organize the project in a clear directory structure, separating configurations, database models, routes, and other concerns.
Please provide a clean codebase with clear comments, so I can continue building on top of this foundation.
It seems to get stuck making a directory
/models
Screenshots attached.
I’m using the latest version of cursor.
Please advise how to resolve.