Welcome to our AI-powered web application project! This README provides comprehensive instructions for setting up and using the development environment.
- Project Overview
- Technology Stack
- Prerequisites
- Getting Started
- Development Workflow
- Project Structure
- Making Changes
- Deployment
- Additional Resources
This project is an AI-powered web application that combines a React frontend with a FastAPI backend. It features a bio page and an AI chat interface, designed to be scalable, maintainable, and easy to develop.
- Frontend: React 17 with TypeScript, styled-components
- Backend: FastAPI (Python 3.9+)
- Containerization: Docker and Docker Compose
Ensure you have the following installed:
- Docker and Docker Compose
- Make
- Node.js 14+ and npm (for local frontend development)
- Python 3.9+ (for local backend development)
-
Clone the repository:
git clone https://github.com/your-repo/ai-powered-web-app.git cd ai-powered-web-app
-
Build and start the development environment:
make setup-dev make start-dev
-
Access the application:
- Frontend: http://localhost:3002
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
Our development environment is containerized using Docker for consistency across different machines.
- Start the development server:
make start-dev
- Stop the development server:
make stop-dev
- Rebuild containers:
make rebuild
- View logs:
make logs
- Frontend: Edit files in
frontend/src
. Changes will hot-reload. - Backend: Edit files in
backend/app
. Restart the backend container to apply changes.
- Frontend: Add to
frontend/package.json
, then runmake rebuild
- Backend: Add to
backend/requirements.txt
, then runmake rebuild
.
├── frontend/
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ├── components/
│ │ │ ├── AIDemo.tsx
│ │ │ ├── Bio.tsx
│ │ │ ├── Skills.tsx
│ │ │ └── common/
│ │ │ ├── Button.tsx
│ │ │ └── Card.tsx
│ │ ├── api/
│ │ │ ├── client.ts
│ │ │ └── index.ts
│ │ ├── styles/
│ │ │ └── theme.ts
│ │ ├── App.tsx
│ │ ├── index.tsx
│ │ └── global.css
│ ├── Dockerfile
│ ├── package.json
│ └── tsconfig.json
├── backend/
│ ├── app/
│ │ └── main.py
│ │ └── routers/
│ │ └── ai_routes.py
│ ├── Dockerfile
│ ├── .env
│ └── requirements.txt
├── infrastructure/
│ └── docker-compose.yml
├── .gitignore
├── Makefile
├── README.md
└── prompt.md
Currently, the project is set up for local development only. For production deployment, you would need to:
- Set up a production-ready server environment
- Configure environment variables for production settings
- Build production-optimized Docker images
- Set up a reverse proxy (e.g., Nginx) to serve the application
- Implement proper security measures (HTTPS, secure headers, etc.)
Remember, development is an iterative process. Don't be afraid to experiment, make mistakes, and learn from them. Happy coding!