Contributing explain how to configure and run the project
Before start the project you need to install the following dependencies
Before start the project you need to configure the following environment variables
********* Frontend/.env *********
VITE_API_URI=http://localhost:9000/api/v1
VITE_API_UPLOAD=http://localhost:9000
VITE_API_URI
This is the url to the APIVITE_API_UPLOAD
This is the url to the API upload
********* Backend/.env *********
#can be 'development' or 'production'
MYSQL_URI=mysql://root:P@tata@localhost:3306/ai_blog_posts
MYSQL_ROOT_PASSWORD=P@tata
MYSQL_DATABASE= ai_blog_posts
CA_PATH=./ca.pem
JWT_SECRET=secret
NODE_ENV=production
EMAIL=deveopsengineer473@gmail.com
PASSWORD=iygj qars kvha yqzx
VITE_URI_HOST=http://localhost:5173
VITE_PROD_URI=http://localhost
VITE_PROD_URI_HTTP=http://localhost:80
VITE_PROD_URI_HTTPS=https://localhost:443
VITE_API_URI=http://localhost:9000/api/v1
VITE_APP_SWAGGER=http://localhost:9000
QDRANT_URL=https://qdrantKEY.cloud.qdrant.io
QDRANT_API_KEY=dUw-ugJVFnQJL-Fak1I7_Z9umNKAZhjcja_JHxbQ
GOOGLE_API_KEY=AIzaVSJRI5ARTCqloQ
GOOGLE_SEARCH_ENGINE_ID=b1faea9a4725
AWS_ACCESS_KEY_ID=PKKIA552525252322JWDZD5OO
AWS_SECRET_ACCESS_KEY=ZfxdnaIVpAYQqho854454
AWS_REGION=us-east-2
AWS_BUCKET_NAME=uploadsblog
NODE_ENV
Configure the environment (development or production)MYSQL_URI
Configure the connection to the databaseMYSQL_ROOT_PASSWORD
Configure the password for the root userMYSQL_DATABASE
Configure the name of the databaseCA_PATH
Configure the path to the certificate fileJWT_SECRET
Configure the secret for the JWTEMAIL
Configure the email for the userPASSWORD
Configure the password for the userVITE_URI_HOST
Configure the url to the frontendVITE_PROD_URI
Configure the url to the backendVITE_PROD_URI_HTTP
Configure the url to the backend httpVITE_PROD_URI_HTTPS
Configure the url to the backend httpsVITE_API_URI
Configure the url to the apiVITE_APP_SWAGGER
Configure the url to the swaggerQDRANT_URL
Configure the url to the qdrantQDRANT_API_KEY
Configure the api key to the qdrantGOOGLE_API_KEY
Configure the api key to the googleGOOGLE_SEARCH_ENGINE_ID
Configure the search engine id to the google this is to web scrap google searchAWS_ACCESS_KEY_ID
Configure the access key id to the awsAWS_SECRET_ACCESS_KEY
Configure the secret access key to the awsAWS_REGION
Configure the region to the awsAWS_BUCKET_NAME
Configure the bucket name to the aws
To install the dependencies, you can use the following commands:
cd Backend
npm install
cd ../Frontend
npm install
or just run make install-dependencies
For execution, we use a Makefile with instructions for both infrastructures. Here you can learn about using Phony Targets. With the Makefile you can:
-
Install dependencies:
make install-dependencies
-
To run the app:
- linux o macOS: ejecuta
make dev-start
- Windows: Run
make dev-backend
and in another terminalmake dev-frontend
- linux o macOS: ejecuta
To create the database, you can use the following commands:
make create-database
To create the certificates, you can use the following commands:
make generate-certificates