Skip to main content

Documentation Index

Fetch the complete documentation index at: https://yorber.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Developer Experience (DX) First

To ensure a seamless onboarding process for other engineers, this architecture is fully containerized. You do not need to install Node.js, TypeScript, or configure a local database to run this project. The entire ecosystem (API Gateway, Content Services, and DB Service) is orchestrated via Docker.

Running the Project

1

Clone the Repository

First, clone the project to your local machine and navigate into the root directory.
git clone [https://github.com/YorberR/social-network-microservices.git](https://github.com/YorberR/social-network-microservices.git)
cd social-network-microservices
2

Environment Variables (Optional)

The docker-compose.yml file is pre-configured with default environment variables for local testing (including default PostgreSQL credentials). If you wish to override them, create a .env file in the root directory.
.env
JWT_SECRET=my_super_secret_key
3

Spin up the Containers

Run the following command to build the images and start all three microservices in detached mode.
docker-compose up -d --build
4

Verify the Services

Once the containers are running, the services will be mapped to the following local ports:
  • API Service (Gateway): http://localhost:3000
  • Content Service (Posts): http://localhost:3001
  • DB Service: http://localhost:3002
  • Follows & Likes: http://localhost:3003 / http://localhost:3004
You can now send a POST request to http://localhost:3000/api/auth/login to start interacting with the API!

Stopping the Ecosystem

To gracefully stop and remove the containers, networks, and volumes created by up, simply run:
docker-compose down