Platform for hiring process at Blueprint
Before starting the project, install:
Install Go: Follow instruction here
Windows | Mac | Linux
cd backend go mod download go get github.com/gin-gonic/gin
go get github.com/lib/pq
go mod tidySwagger doc
swag init -g cmd/api/v1/main.go -o docs go run cmd/api/v1/main.goSwagger backend can visit via http://localhost:8080/swagger/index.html and the request make to backend will be through http://localhost:8080
Install dependencies
npm installRun the frontend:
cd frontend
npm run devsupabase folder (setup db local dev host): RUN:
Supa base set up command:
cd supabase
npm init -y
npm install supabase --save-dev
npx supabase initthen use this command tostart local supabase ** Have to have docker open when run **
npx supabase startaccess Access Supabase Studio (GUI) with http://localhost:54323
Local Database Connection String postgres://postgres:postgres@localhost:54322/postgres
Ex:
npx supabase migration new create_users_tableThen apply changes to the new created migration file
Then, make sure it is runnning
npx supabase startApply migration
npx supabase db reset- handlers (handle http requests and responses, HTTP status code)
- middlewwares (authentication, authorization)
- models (Define data structures used across the application like database entities Users, Application)
- routes (Define all API endpoints and connect them to handlers --> map API to handlers)
- services ( application logic like validate email format, password strength)
- utils ( helper function like Data formatting)
- repositories ( Execute SQL queries (SELECT, INSERT, UPDATE, DELETE))