Make It Yours: Customizing the Starter Template¶
This guide helps you take the FastAPI React Starter template and adapt it into your own unique project.
1. Introduction¶
The FastAPI React Starter is designed to give you a head start with a modern tech stack and a sensible project structure. Follow these steps to rebrand and customize it.
2. Renaming the Project¶
Consistent naming is key. Here's where to change the project's name:
- 
Root Directory: - Rename the main project folder (e.g., fastapi-react-startertomy-awesome-project).
- If you've already pushed to a Git remote, you might need to update the remote URL or create a new repository.
 
- Rename the main project folder (e.g., 
- 
**Backend ( backend/pyproject.toml):- Update the nameunder[tool.poetry]:
 
- Update the 
- 
**Frontend ( frontend/package.json):- Update the namefield:
 
- Update the 
- 
**Backend Configuration ( backend/app/config/config.py):- Change the APP_NAMEin theSettingsclass:
 
- Change the 
- 
**Documentation ( docs/mkdocs.yml):- Update site_name:
- Consider adding/updating site_authorandrepo_url:
 
- Update 
- 
**Frontend Title ( frontend/index.html):- Update the <title>tag and<meta name="description">:
 
- Update the 
3. Customizing Backend (FastAPI)¶
- Core Logic:- Review and modify/remove existing example routes in backend/app/routes/(e.g.,auth.py,health.py).
- Update or replace schemas in backend/app/schemas/.
- Adapt or remove services in backend/app/services/.
- Define your own SQLAlchemy models in backend/app/db/models.pyand generate new migrations (see Development Guide).
 
- Review and modify/remove existing example routes in 
- **Configuration (backend/app/config/config.py):- CRITICAL: Set a new, strong SECRET_KEY(orJWT_SECRET_KEYenvironment variable) for JWT authentication. Do not use the development default.
- Adjust CORS_ORIGINSfor your frontend's domain(s).
- Review other settings (database connection, API prefix, etc.).
 
- CRITICAL: Set a new, strong 
- **Dependencies (backend/requirements.txtorbackend/pyproject.toml):- Add, remove, or update Python dependencies based on your project's needs.
 
4. Customizing Frontend (React)¶
- Core Logic & UI:- Review and modify/remove example components in frontend/src/components/andfrontend/src/features/.
- Update routes in frontend/src/App.tsxorfrontend/src/routes/.
- Adapt or remove custom hooks in frontend/src/hooks/.
 
- Review and modify/remove example components in 
- Styling (Tailwind CSS & shadcn/ui):- Modify frontend/tailwind.config.jsto customize your Tailwind theme (colors, fonts, etc.).
- Adjust global styles in frontend/src/index.css(or equivalent).
- Customize or replace shadcn/ui components from frontend/src/components/ui/.
 
- Modify 
- Public Assets:- Replace frontend/public/favicon.icoand other icons/logos with your own.
- Update any static images or assets in frontend/public/.
 
- Replace 
- **Dependencies (frontend/package.json):- Add, remove, or update Node.js dependencies.
 
5. Docker Configuration (docker-compose.yml)¶
- Container Names: For clarity, update container_namefor each service:
- Image Names: If you plan to build and push Docker images to a registry, you'll want to tag them appropriately in your build process (e.g., your-registry/myproject-backend:latest). Thebuild:context indocker-compose.ymldefines how images are built locally.
6. Documentation¶
- Content: Update docs/index.mdwith your project's overview.
- Review and modify all other .mdfiles in thedocs/directory to reflect your project's specifics, removing or altering template-related information.
- Configuration (docs/mkdocs.yml): As mentioned in section 2, updatesite_name,site_author,repo_url, andsite_url.
7. License¶
- The starter template uses the MIT License. If your project requires a different license, update the LICENSEfile in the project root.
8. Cleaning Up¶
- Search for and remove any template-specific comments, TODOitems, or placeholder code that is no longer relevant.
- Remove or replace example images, SVGs (like frontend/public/starter.svg), and other assets.
- Ensure all example user accounts, data, or configurations are cleared before deploying to production.
By following these steps, you can effectively transform the FastAPI React Starter template into a solid foundation for your own application.