# FastAPI App

Generated by `pd init fastapi`.

## Structure

- `/app` contains the main application code.
- `/public` serves static fonts, images and JavaScript files.
- `/ui` contains the TypeScript, React and Tailwind based frontend.

```bash
|-- app/
    |-- apis/ # Third-party APIs (e.g. OpenAI)
        |-- api.py
    |-- model/ # Data models (e.g. Pydantic)
        |-- model.py
    |-- routers/ # Application routes (uses FastAPI Router)
        |-- home.py
    |-- main.py # FastAPI Entry Point
|-- public/ # Static files
    |-- fonts/
        |-- Rosario-Regular.ttf
    |-- images/
        |-- pd.png
    |-- js/
        |-- bundle.js # Generated by TypeScript
    |-- favicon.ico
    |-- logo192.png
    |-- logo512.png
    |-- manifest.json
    |-- robots.txt
|-- ui/
    |-- App.tsx # React App
    |-- index.css # CSS Entry point
    |-- index.html # HTML Entry point (Suports SSR via Jinja2)
    |-- index.tsx # TypeScript Entry point
|-- .gitignore
|-- package.json # Node.js dependencies
|-- postcss.config.js # PostCSS configuration
|-- README.md # This file
|-- requirements.txt # FastAPI App dependencies]
|-- tailwind.config.js # Tailwind CSS configuration
|-- tsconfig.json # TypeScript configuration
|-- webpack.config.js # Webpack configuration
```

## Development

To start the frontend development server, run:

```bash
npm install
npm run dev # Starts the webpack dev server
```

To start the python backend server, run:

```bash
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

python3 -m uvicorn app.main:app --reload
```

Open [http://localhost:8000](http://localhost:8000) in your resume to view the homepage.

You can start editing the page by modifying `ui/App.tsx`. The page auto-updates as you edit the file.

You can add more routes by creating or modifying files in the `app/routers` directory.

## Learn More

You can checkout the following resources:

1. Backend Server: [FastAPI](https://fastapi.tiangolo.com/)
2. Server-Side Rendering: [Jinja2](https://jinja.palletsprojects.com/)
3. Client-Side Rendering: [React](https://reactjs.org/)
4. Styling: [Tailwind CSS](https://tailwindcss.com/)
5. Bundling: [Webpack](https://webpack.js.org/)