{"id":23399536,"url":"https://github.com/calcagnoloic/react-fastapi-boilerplate","last_synced_at":"2026-04-10T15:46:21.279Z","repository":{"id":268847218,"uuid":"905607025","full_name":"CalcagnoLoic/react-fastapi-boilerplate","owner":"CalcagnoLoic","description":"Boilerplate for projects using React as service frontend and Python as service backend","archived":false,"fork":false,"pushed_at":"2024-12-19T09:21:40.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T15:46:13.187Z","etag":null,"topics":["boilerplate-template","docker-compose","fastapi","flake8","pytest","python","reactts","tailwind","vitest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/CalcagnoLoic.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-12-19T07:04:14.000Z","updated_at":"2024-12-19T09:21:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"1101417f-7a72-4ada-aacc-b7666226d8e3","html_url":"https://github.com/CalcagnoLoic/react-fastapi-boilerplate","commit_stats":null,"previous_names":["calcagnoloic/react-fastapi-boilerplate"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalcagnoLoic%2Freact-fastapi-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalcagnoLoic%2Freact-fastapi-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalcagnoLoic%2Freact-fastapi-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalcagnoLoic%2Freact-fastapi-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CalcagnoLoic","download_url":"https://codeload.github.com/CalcagnoLoic/react-fastapi-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247918940,"owners_count":21018043,"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","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":["boilerplate-template","docker-compose","fastapi","flake8","pytest","python","reactts","tailwind","vitest"],"created_at":"2024-12-22T10:14:37.256Z","updated_at":"2025-12-30T23:05:41.532Z","avatar_url":"https://github.com/CalcagnoLoic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React project with FastAPI - Boilerplate\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://skillicons.dev\"\u003e\n    \u003cimg src=\"https://skillicons.dev/icons?i=ts,react,tailwind,py,fastapi,vite\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n![GitHub last commit](https://img.shields.io/badge/last%20update-19%20/12%20/2024-red)\n\n# **_Table of contents_**\n\n- [Context](https://github.com/CalcagnoLoicreact-fastapi-boilerplate?tab=readme-ov-file#context)\n- [Template structure for frontend](https://github.com/CalcagnoLoic/react-fastapi-boilerplate?tab=readme-ov-file#template-structure-for-frontend)\n  - [Structuring the various `src` folder](https://github.com/CalcagnoLoic/react-fastapi-boilerplate?tab=readme-ov-file#structuring-the-various-src-folder)\n  - [Adding `meta-tags` to the project](https://github.com/CalcagnoLoic/react-fastapi-boilerplate?tab=readme-ov-file#how-to-use-it)\n  - [Description of `package.json` scripts](https://github.com/CalcagnoLoic/react-fastapi-boilerplate?tab=readme-ov-file#how-to-use-it)\n- [Template structure for backend](https://github.com/CalcagnoLoic/react-fastapi-boilerplate?tab=readme-ov-file#template-structure-for-backend)\n- [How to use it](https://github.com/CalcagnoLoic/react-fastapi-boilerplate?tab=readme-ov-file#how-to-use-it)\n- [Technologies used in the template](https://github.com/CalcagnoLoic/react-fastapi-boilerplate?tab=readme-ov-file#technologies-used-in-the-template)\n\n# Context\n\nThis template provides a minimal setup to get React project with FastAPI for backend structure. A CI starter is also included in the template.\n\n# Template structure for frontend\n\nThis template has a fairly common structure, with a folder for CICD workflows, a public folder and a source folder. A few rules from the linter are used to add a working environment to TypeScript.\n\n## Structuring the various `src` folder\n\nIn the `src` folder, you can find various subfolders. These are all created in the same way. Namely, a subfolder with a descriptive name and his file. In the template, you'll find them under the name `Example...tsx`. Feel free to rename them or simply delete them to work with something other than `Example...tsx`.\n\nWhat's more, a subfolder can itself have several subfolders. For example, the `User` component can be made up of `UserProfile`, `UserInformation`, `UserImg`, each with its own file.\n\nLet's have a look at the different folders:\n\n- `components`: folder containing all application components\n- `containers`: folder containing the application's container(s)\n- `hooks`: folder containing the various custom hooks\n- `icons`: folder containing the project's icons in `svg` code form. Sub-folders for icon families such as `GeneralIcons`, `MediaIcons`, etc. are also possible.\n- `layout`: folder containing the project's layout(s), such as grids\n- `pages`: folder containing the page(s), whether a SPA or not\n- `typographies`: folder containing typographic components for title levels and paragraphs\n- `utils`: folder containing utility functions and their associated spec files\n\nPlease note that in the `Typographies` folder, as these components are generic, they are already fully written. Modify the `Headings` component if your title levels go beyond `h3`.\n\nFinally, in the `definitions.ts` file, you'll find all the useful interfaces and types.\n\n## Adding `meta-tags` to the project\n\nIn the `index.html` file, meta tags for author, description and keywords are already available. Feel free to modify them or simply add another!\n\n## Description of `package.json` scripts\n\nVarious scripts are already available in the `package.json` file, but don't hesitate to add your own if you have others!\n\nHere are those already available:\n\n- `dev`: simply launch the local development server on port `5173`\n- `dev:compile`: compiles TypeScript files in real time (thanks to the `--watch` flag) during dev phases to ensure that changes don't affect the linter\n- `dev:format`: just formats files (\u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003es\u003c/kbd\u003e works just as well with the prettier file)\n- `build`: vite command to send the project to production\n- `lint`: the project linter\n- `test`: vitest command to launch unit test suites\n\n# Template structure for backend\n\nLet's have a look at the different folders:\n\n- `app`: This folder contains the core of the FastAPI application.\n    - `controllers`: Contains files defining API endpoints.\n    - `database`: Contains database configurations and connections.\n    - `models`: Defines table structures in the database using ORMs such as SQLAlchemy\n    - `schemas`: Defines data schemas for validating PLC inputs and outputs with Pydantic.\n- `tests`: This folder contains tests to validate your application's functionality using pytest.\n- `utils`: Contains generic functions and utility classes used throughout the application\n\n# How to use it\n\nTo use this template, click on `Use this template \u003e Create a new repository` at the top right of this page.\n\nOnce you've done this, you'll be taken to the standard interface for creating a project, this time using the present template as a base.\n\nNext, the classic steps:\n\n```bash\n$ git clone\n$ cd path/to/our/project\n```\n\nIn order to launch the project locally, you'll need to start docker on your machine and run the following two lines to build the images and launch the 4 services.\n\n```bash\n\u003e docker compose build\n\u003e docker compose up\n```\n\nIf you need to access at the database, don't forget to create an `env.` file avec these differents variables:\n\n```env\nMARIADB_USER=\nMARIADB_PASSWORD=\nMARIADB_DATABASE=\nMARIADB_ROOT_PASSWORD=root\n```\n\nStart by creating your database with Adminer and then export the code. Paste it into the file here: `./server/database/database.sql`. Once this is done, restart the “db” service. The volume will fetch the code contained in the 'database.sql' file and place it in a docker-side volume. \n\nTo launch the frontend server, you must first position yourself within it. Once done, connect to the service's docker terminal, install the dependencies and launch it.\n\n```bash\n\u003e cd client\n\u003e docker compose exec client bash\n\u003e cd client #To enter the docker client folder\n\u003e npm i\n\u003e npm run dev\n```\n\nAnd.... happy codings!! 🥳\n\n# Technologies used in the template\n\n- FastAPI | v.0.1\n- NodeJS | v.21.7\n- Python | v.3.12\n- React | v.18.3\n- TailwindCSS | v.3.4\n- TypeScript | v.5.6\n- Vite | v.5.4\n- Vitest | v.2.1\n- Workflows CICD\n\n---\n\nIf you have a modification or see a bug, don't hesitate to open a pull request 😊\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalcagnoloic%2Freact-fastapi-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalcagnoloic%2Freact-fastapi-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalcagnoloic%2Freact-fastapi-boilerplate/lists"}