A starting point for a metaverse-like server, heavily inspired by Reticulum.
- Server Side Rendering (SSR): Delivers pre-rendered content for better SEO and performance.
- RESTful API: Provides endpoints for user authentication, management, and additional features.
- Swagger Documentation: Auto-generated API documentation.
- Dockerized Environment: Easily build and run the application with Docker and Docker Compose.
- Makefile Automation: Simplifies tasks such as building, testing, and generating documentation.
- Go 1.22 or later
- Docker
- Docker Compose
- Clone the Repository:
git clone https://github.com/AdrianoCLeao/ssr-metaverse.git
cd ssr-metaverse
- Set Environment Variables:
Create a
.env
file in the root directory or set the following variables in your environment:
JWT_SECRET=secret
DB_HOST=db
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=metaverse
- Build and Run Locally:
make build
make up
The server will be accessible at http://localhost:8080. You can test the health of the database on the /health route.
The available commands are:
-
make build
: Build the Docker image using Docker Compose. -
make up
: Start the containers in detached mode using Docker Compose. -
make down
: Stop and remove Docker containers. -
make logs
: Display logs of the "app" container. -
make docs
: Generate Swagger documentation using the swag CLI. -
make clean
: Remove the locally generated binary.