{"id":15603803,"url":"https://github.com/achronus/fastapi-quickstart","last_synced_at":"2025-10-05T17:14:54.908Z","repository":{"id":215077031,"uuid":"737964535","full_name":"Achronus/fastapi-quickstart","owner":"Achronus","description":"A quickstart tool for creating a FastAPI project with Jinja2, TailwindCSS, Flowbite, HTMX, and AlpineJS.","archived":false,"fork":false,"pushed_at":"2025-06-21T19:43:16.000Z","size":119,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T20:28:10.486Z","etag":null,"topics":["alpinejs","fastapi","flowbite","htmx","jinja2","python","quickstartpack","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Achronus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-02T04:48:35.000Z","updated_at":"2025-05-13T00:49:32.000Z","dependencies_parsed_at":"2024-01-09T07:41:05.981Z","dependency_job_id":"261249ce-5643-4a4e-a5a9-285677e29ba2","html_url":"https://github.com/Achronus/fastapi-quickstart","commit_stats":null,"previous_names":["achronus/fastapi-quickstart"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Achronus/fastapi-quickstart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Achronus%2Ffastapi-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Achronus%2Ffastapi-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Achronus%2Ffastapi-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Achronus%2Ffastapi-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Achronus","download_url":"https://codeload.github.com/Achronus/fastapi-quickstart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Achronus%2Ffastapi-quickstart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486308,"owners_count":25994945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpinejs","fastapi","flowbite","htmx","jinja2","python","quickstartpack","tailwindcss"],"created_at":"2024-10-03T03:21:15.140Z","updated_at":"2025-10-05T17:14:54.890Z","avatar_url":"https://github.com/Achronus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Project Quickstart Tool\n\nWelcome to the quickstart tool for creating a `FastAPI` project with the following stack:\n\n- [FastAPI](https://github.com/tiangolo/fastapi)\n- [Jinja2 Templates](https://jinja.palletsprojects.com/)\n- [TailwindCSS](https://tailwindcss.com/) and [Flowbite](https://flowbite.com/)\n- [AlpineJS](https://alpinejs.dev/)\n- [HTMX](https://htmx.org/)\n\nThe default pip packages installed include:\n\n- `fastapi`\n- `uvicorn[standard]`\n- `sqlalchemy`\n- `jinja2`\n- `python-dotenv`\n- `poetry`\n\n_Note: all libraries and packages are automatically installed to their latest versions when running the tool._\n\n## Why This Tool?\n\nCreating a project from scratch can be a tedious process. So, I wanted to simplify it! This tool is ideal for those that are looking to quickly prototype a project without worrying about `JavaScript` frameworks, such as `Backend Developers` and `ML Engineers`.\n\nThe tool does the following:\n\n- Creates a virtual environment in the project folder\n- Accesses it, updates `PIP` and installs the required packages\n- Creates a `.env` file\n- Creates a `backend` directory with a basic application template for `FastAPI`\n- Creates a `frontend` directory with some basic `Jinja2` template files\n  - Such as a `_base.html` and `index.html`\n- Creates a `frontend/public` files directory for storing `css`, `js`, and `img` files locally\n  - Adds `TailwindCSS`, `Flowbite`, `HTMX`, and `AlpineJS` static files\n- Performs some file cleanup such as removing `node_modules` (if your OS supports TailwindCSS standalone CLI), `venv` and `package.json` files\n\n## Dependencies\n\nThe tool is intended to be dynamic and aims to install the most recent packages where possible. To do this, we require [NodeJS](https://nodejs.org/en), `NPM` and [Python](https://www.python.org/downloads/) to be installed on your local machine, with the latest stable versions. \n\nWe use `node_modules` and `PIP` to maintain the latest versions of the core stack, and remove the `node_modules` after creation to simplify the project folder.\n\nFortunately, `Tailwind` has a [Standalone CLI](https://tailwindcss.com/blog/standalone-cli) that allows us to watch and minify files without needing `NodeJS`!\n\n\n### Customisation and Configuration\n\nAll files added to the project are stored in `setup_assets`. If you want add files, feel free but it is recommended not to mess with the file structure. Here a few things to note:\n- All the files are added to the `project` root directory\n- Static files **MUST** be stored in a `setup_assets/frontend/static` folder\n- The static folder name is changed dynamically during project creation from `frontend/static` -\u003e `frontend/public`\n\nFor configuration customisation go to `config.py` in the root directory. Here you have three options:\n- Changing the database URL -\u003e `DATABASE_URL`, defaults to a SQLite local database.\n- Adding additional PIP packages to the project -\u003e `ADDITIONAL_PIP_PACKAGES`\n- Adding additional `.env` file variables -\u003e `ENV_FILE_ADDITIONAL_PARAMS`\n\nNote: the last two options are treated as python `list` objects that accept `strings` only.\n\n\n### Creation\n1. To get started, clone the repository, enter the folder and run `create` with a `name` (e.g., `my_project`) argument inside a `poetry shell`. This creates a new project inside the `parent` directory of the `fastapi-quickstart` directory:\n\n```bash\ngit clone https://github.com/Achronus/fastapi-quickstart.git\ncd fastapi-quickstart\npoetry shell\ncreate my_project  # Replace me with custom name!\n```\n\nFor example, if you have a parent folder called `projects` and are making a project called `todo_app` the project is created in `projects/todo_app` instead of `projects/fastapi-quickstart/todo_app`.\n\n\n### And That's It!\n\nEverything is setup with a blank template ready to start building a project from scratch. Run the following commands to run the docker `development` server and watch `TailwindCSS` locally!\n\nNot got Docker? Follow these instructions from the [Docker website](https://docs.docker.com/get-docker/).\n\n\n```bash\ncd ../my_project  # Replace me with custom name!\ndocker-compose up -d --build dev\n\npoetry shell\npoetry install\n\nwatch\n```\n\nThen access the site at [localhost:8080](http://localhost:8080).\n\n\n### Production\n\nDocker also comes configured with a production variant. Inside the `my_project` folder run:\n```bash\ndocker-compose up -d --build prod\n```\n\nThen you are good to go!\n\n\n## Folder Structure\n\nThe newly created project should look similar to the following:\n\n```bash\nproject_name\n└── config\n|   └── docker\n|   |   └── Dockerfile.backend\n└── project_name\n|   └── backend\n|   |   └── database\n|   |       └── __init__.py\n|   |       └── crud.py\n|   |       └── models.py\n|   |       └── schemas.py\n|   └── frontend\n|   |   └── public\n|   |   |   └── css\n|   |   |   |   └── flowbite.min.css\n|   |   |   |   └── input.css\n|   |   |   |   └── style.min.css\n|   |   |   └── imgs\n|   |   |   |   └── avatar.svg\n|   |   |   └── js\n|   |   |       └── alpine.min.js\n|   |   |       └── flowbite.min.js\n|   |   |       └── htmx.min.js\n|   |   |       └── theme-toggle.js\n|   |   └── templates\n|   |       └── components\n|   |       |   └── navbar.html\n|   |       └── _base.html\n|   |       └── index.html\n|   └── tests\n|   |   └── __init__.py\n|   └── .env\n|   └── .gitignore\n|   └── build.py\n|   └── main.py\n|   └── tailwind.config.js\n|   └── tailwindcss OR tailwindcss.exe\n└── .dockerignore\n└── database.db\n└── docker-compose.base.yml\n└── docker-compose.yml\n└── poetry.lock\n└── pyproject.toml\n└── README.md\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachronus%2Ffastapi-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fachronus%2Ffastapi-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachronus%2Ffastapi-quickstart/lists"}