A full-stack application for AI-powered image generation and manipulation.
whatif/
├── frontend/ # Next.js frontend application
│ ├── app/ # Frontend source code
│ ├── public/ # Static files
│ └── package.json # Frontend dependencies
└── backend/ # FastAPI backend application
├── app/ # Backend source code
└── requirements.txt # Python dependencies
- Create and activate a Python virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
npm run backend:install
# or directly:
pip install -r requirements.txt- Create a
.envfile in the backend directory:
MONGODB_URI=mongodb://localhost:27017
JWT_SECRET=your-secret-key-here
DEBUG=True
- Start the backend server:
npm run backend:dev
# or directly:
uvicorn app.main:app --reloadThe backend will be available at http://localhost:8000
- Install dependencies:
npm run install
# or directly:
cd frontend && npm install- Start the development server:
npm run frontend:dev
# or directly:
cd frontend && npm run devThe frontend will be available at http://localhost:3000
npm run frontend:dev- Start frontend development servernpm run frontend:build- Build frontend for productionnpm run frontend:start- Start frontend production servernpm run backend:dev- Start backend development servernpm run backend:install- Install backend dependenciesnpm run install- Install frontend dependencies
Once the backend is running, you can access the API documentation at:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc