jholdings-v0: A robust and scalable chatbot interface integrating React and FastAPI to deliver responsive user interactions and efficient server-side processing. This project showcases best practices in software architecture, combining modern frontend technologies with powerful backend APIs.
To install and configure this project on your computer, follow these steps:
-
Clone this repository by running the following command in your terminal:
git clone https://github.com/mrjohnnyrocha/jholdings-v0.git
-
Navigate to the project directory:
cd jholdings-v0
-
Install the required dependencies by running the following command:
npm install
-
Start the development server:
npm start
-
Deploy the FastAPI server on local port 3017:
uvicorn main:app --port 3017 --reload
-
Once the above steps are completed, you should have the project up and running on your local machine. You can now access it by opening your web browser and navigating to http://localhost:3017
.
Instructions on how to use your project and any relevant examples. Use .env
and nginx
files for deploying the frontend server, and also the backend if necessary.
To deploy the frontend server using .env
file, follow these steps:
- Create a
.env
file in the root directory of your project. - Add the necessary environment variables in the
.env
file. For example:REACT_APP_API_URL=http://localhost:3017
- Build the frontend application by running the following command:
npm run build
- Configure your nginx server to serve the built files. Here's an example nginx configuration:
server { listen 3017; server_name your-domain.com; location / { root /<path-to-your-local-frontend>/build; index index.html; try_files $uri /index.html; } }
- Start your nginx server to serve the frontend application.
To deploy the backend server using .env
file, follow these steps:
- Create a
.env
file in the root directory of your project. - Add the necessary environment variables in the
.env
file. For example:DATABASE_URL=postgresql://username:password@localhost:5432/database
- Start the backend server using the following command:
uvicorn app:app --port 8000 --reload
Make sure to replace the example values with your actual configuration. These steps will help you deploy both the frontend and backend servers using .env
and nginx
files.
Guidelines for contributing to your project and how others can get involved.
This project is licensed under the MIT License.
- Email: joaorocha619@gmail.com
- GitHub: mrjohnnyrocha