Below is a step-by-step guide to set up the Frontend (Next.js) and Backend (Golang + Fiber) for Honya Books.
Make sure you have the following installed:
- Node.js
- PNPM (for frontend)
- Go
- PostgreSQL
- Docker (optional, for running application in containers)
Duplicate the
.env.examplefile in bothfrontendandbackenddirectories and rename it to.env. Make sure you have the following environment variables set up:
Frontend
-
BACKEND_API_URL
Backend
-
DATABASE_URL: URL of the PostgreSQL database -
SERVER_PORT: Port the server will run on -
LOG_STACK: Stack the logs will be stored in -
LOG_RETENTION: Retention period for the logs
AWS Credentials
-
AWS_BUCKET_NAME: Name of the AWS bucket -
AWS_REGION: Region of the AWS bucket -
AWS_ACCESS_KEY_ID: Access key ID for the AWS bucket -
AWS_SECRET_ACCESS_KEY: Secret access key for the AWS bucket
URL Cleanup Original Domain
-
URL_CLEANUP_ORIGINAL_DOMAIN: Original domain of the URL for cleanup
git clone https://github.com/TechAtikiN/honya.git
cd honya- Using Makefile
make install
make installwill install both frontend and backend dependencies.
- Custom Install
cd frontend
pnpm install # Install frontend dependenciescd backend
go mod download # Install backend dependencies- Using Makefile
make run # Run the application- Using Docker
make docker-up # Run the application in containers- Custom Run
Frontend
cd frontend
pnpm dev # Run the frontendBackend
cd backend
go run main.go # Run the backend- Frontend:
http://localhost:3000 - Backend:
http://localhost:8080
Swagger UI: http://localhost:8080/swagger/
The API documentation can be found at API.md file.