Skip to content

FeedTheRealm-org/core-service

Repository files navigation

Feed the Realm Core-service

Monolithic backend for all adjacent services to the game.

Structure must always stay easy to divide into microservices and escalate if needed.

Documentation

For detailed information, please refer to the specific documentation files in the docs/ directory:

Technologies

Quick Start

Dependencies

Development

# Setup environment variables
cp .env.example .env

# Run development environment (API, DB, Buckets)
make dev

Production

How to use docker to build and run server.

# Build docker image
docker build -t core-service .

# Run dockerized container
docker run --rm -p <any_port>:8080 core-service:latest

# Cleanup image
docker rmi join-travel-back:latest

How to test

See the Testing Guide for more details.

# Run tests in Docker (includes acceptance tests)
make test

Makefile Commands

The project includes a Makefile with convenient commands for development and testing. See Development Guide for more usage examples.

# Show all available commands with descriptions
make help

# Development commands
make dev          # Starts detached containers and an interactive shell
make up-build     # Builds & starts production profile containers, or just: make up
make build        # Builds production profile containers
make down         # Stops all running containers

# Testing commands
make test         # Build, run, and execute tests in a clean Docker environment

# Documentation
make swagger      # Generate Swagger documentation

Database Migrations

The project uses golang-migrate for database migrations. Migration files are located in the migrations/ directory. For setup details, see Development Guide.

Structure

See Architecture Documentation for a comprehensive breakdown of the modular monolith design.

Swagger Documentation

Endpoint documentation was made with Swagger. Once starting up the project, navigate to this link to test out the endpoints:

http://localhost:8000/swagger/index.html

Maintenance Scripts

Check the Development Guide for full descriptions of maintenance scripts like seed_items.sh and reset_items_data.sh.

About

Core service as non-game backend for feed the realm

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors