This is a template with boilerplate code for REACT frontend, connected with FASTAPI backend, that can be implemented into any project without any hassle.
React app acts as the frontend UI, and deals with the user input. Make sure fastapi is up and running too, so that it can accept the data from UI, and send appropriate response.
You can integrate any Machine Learning models, or full stack development, or anything. The world is your oyester.
In order to run both frontend and backend, enter the following commands:
-
Clone this repository to your file location.
git clone https://github.com/S-acharya57/fast-react.git -
Replace the IP if needed in both
fastapicode andReactapp. -
Write your code in
mainpage.component.jsinsidesrc/componentsinsidereact-appdirectory. You can add more code in fastapi and send request to them from frontend, in a similar way as signup and login. -
Run the fastapi server to accept requests from frontend.
uvicorn main:app --reload -
Run the React app too, and enjoy!
cd react-appandnpm start


