Skip to content

decentraland/core-template-server

 
 

{server-name} Server

Coverage Status

This server interacts with X, Y and Z server in order to provider users with F.

Table of Contents

Features

  • Feature 1: Provides Y functionality to the users.

Dependencies & Related Services

This service interacts with the following services:

External dependencies:

  • List any external APIs or third-party services
  • Database systems
  • Message queues or event streams

API Documentation

The API is fully documented using the OpenAPI standard. It's schema is located at docs/openapi.yaml.

Database

Schema

See docs/database-schemas.md for detailed schema, column definitions, and relationships

Migrations

The service uses node-pg-migrate for database migrations. These migrations are located in src/migrations/. The service automatically runs the migrations when starting up.

Create a new migration

Migrations are created by running the create command:

yarn migrate create name-of-the-migration

This will result in the creation of a migration file inside of the src/migrations/ directory. This migration file MUST contain the migration set up and rollback procedures.

Manually applying migrations

If required, these migrations can be run manually.

To run them manually:

yarn migrate up

To rollback them manually:

yarn migrate down

Getting Started

Prerequisites

Before running this service, ensure you have the following installed:

  • Node.js: Version 24.x or higher (LTS recommended)
  • Yarn: Version 1.22.x or higher
  • Docker: For containerized deployment

Installation

  1. Clone the repository:
git clone https://github.com/{org-name}/{repo-name}.git
cd {repo-name}
  1. Install dependencies:
yarn install
  1. Build the project:
yarn build

Configuration

The service uses environment variables for configuration. Create a .env file in the root directory containing the environment variables for the service to run. Use the .env.default variables as an example.

Running the Service

Setting up the environment

In order to successfully run this server, external dependencies such as databases, memory storages and such must be provided. To do so, this repository provides you with a docker-compose file for that purpose. In order to get the environment set up, run:

docker-compose up

Running in development mode

To run the service in development mode:

yarn start:dev

Testing

This service includes comprehensive test coverage with both unit and integration tests.

Running Tests

Run all tests with coverage:

yarn test

Run tests in watch mode:

yarn test --watch

Run only unit tests:

yarn test test/unit

Run only integration tests:

yarn test test/integration

Test Structure

  • Unit Tests (test/unit/): Test individual components and functions in isolation
  • Integration Tests (test/integration/): Test the complete request/response cycle

For detailed testing guidelines and standards, refer to our Testing Standards documentation.

AI Agent Context

For detailed AI Agent context, see docs/ai-agent-context.md.


Note: Remember to replace all placeholders in this README (e.g., {server-name}, {org-name}, {repo-name}, {service-name}, links to documentation) with actual values specific to your service.

About

Template Node.js server using well-known-components library.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 85.6%
  • Dockerfile 11.2%
  • JavaScript 3.2%