Implementation of Microservices GenUI Architecture. The Current Microservices are:
You can setup & run the project locally on your machine or on docker. Firstly let'e setup the env vars.
In auth-server
Rename .env.example to .env and add DB_URL, TEST_DB_URL, SECRET_KEY
In todo-server add DB_URL & TEST_DB_URL. They can be same as above or different
For nextjs-client run pnpm install - no need to update them
Open root dir i.e: cax in terminal and run
make auth
& visit http://localhost:8080/api/docs
make todo
& visit http://localhost:8000/api/docs
make next
& visit http://localhost:3000
Rename root .env.example to .env and add the missing env vars (DB_URL=, TEST_DB_URL=, SECRET_KEY=)
Run: docker compose -d up
We will be deploying FastAPI Microservices to Google Cloud Run and NextJS CUI to Vercel.
Ensure your have gcloud and vercel cli installed & authenticated
auth-server
cd auth-server
gcloud run deploy auth-server --source . --port 8080 --env-vars-file .env.gcp.yaml --allow-unauthenticated --region us-central1 --min-instances 1
cd todo-server
gcloud run deploy todo-micro-server --source . --port 8000 --env-vars-file .env.gcp.yaml --allow-unauthenticated --region us-central1 --min-instances 1
cd nextjs-client
vercel link
Then visit vercel and add all env vars to your project and in terminal run:
vercel --prod