Soul Connect is a peer-support social network where people can safely share personal stories, ask for advice, and receive empathetic feedback from the community. The platform combines a React web client with several Go microservices and supporting infrastructure that securely stores data, processes events, and delivers notifications.
- π Share stories and updates tied to personal experiences and emotional well-being.
- π¬ Receive comments, reactions, and suggestions from other community members.
- π Register, authenticate, and manage your personal profile.
- π£ Subscribe to updates and get real-time notifications about community activity.
- π Process events asynchronously through Kafka to keep the platform responsive and scalable.
| Component | Description |
|---|---|
sc-webapp |
React client that interacts with end users. |
sc-api-getaway |
API gateway that aggregates requests to microservices and exposes REST/Swagger endpoints. |
sc-auth |
gRPC/REST service for registration, login, and authentication. |
sc-user, sc-post, sc-notification |
Domain services that manage profiles, posts, and notifications. |
sc-kafka |
Kafka orchestration service that provisions topics and consumers. |
postgres |
Persistent storage for users and content. |
zookeeper, kafka-broker |
Kafka infrastructure required for event streaming. |
βββ docker-compose.yml # Production-ready docker-compose for the entire stack
βββ local.docker-compose.yml # Simplified compose file for local development
βββ postgres/ # Database configuration and Dockerfile
βββ proto/ # gRPC contract definitions
βββ sc-api-getaway/ # API gateway service written in Go
βββ sc-auth/ # Authentication microservice
βββ sc-post/, sc-user/, ... # Additional domain services
βββ sc-kafka/ # Kafka integration utilities
βββ sc-webapp/ # React client
Make sure the following tools are installed:
- Git for cloning the repository.
- Docker and Docker Compose v2.20 or newer.
- Go 1.23+ if you plan to run Go services outside Docker.
- Node.js 18+ and a package manager (npm, pnpm, or yarn) for running the web client locally.
- Clone the repository:
git clone https://github.com/<your-account>/soul-connect.git cd soul-connect
- (Optional) Configure environment variables:
- Copy
example.envfrom each service into.envand adjust values if necessary. - For the web client:
cp sc-webapp/example.env sc-webapp/.env.
- Copy
- Build and start the backend stack:
This will start Postgres, Kafka, and all core microservices.
docker compose up --build
- Verify everything is running:
- API Gateway: http://localhost:8000
- Swagger (if enabled in the API Gateway): http://localhost:8000/swagger/index.html
- Launch the web client separately (see βLocal setup without Dockerβ).
- Shut down the services:
docker compose down
The local.docker-compose.yml file spins up a minimal stack (database, API gateway, Kafka). Start it the same way:
docker compose -f local.docker-compose.yml up --buildAttach additional services and the web client manually when needed.
- Start PostgreSQL:
Create the
docker compose up postgres -d
sc_dbdatabase if it is not provisioned automatically. - Prepare environment variables:
Update connection parameters (
cp sc-auth/example.env sc-auth/.env cp sc-api-getaway/example.env sc-api-getaway/.env # repeat for other services when necessaryDB_SOURCE,GRPC_AUTH_PORT,WEBAPP_BASE_URL, etc.) to match local ports. - Install dependencies and run services:
Use
cd sc-auth && go mod tidy && go run cmd/general/main.go cd sc-api-getaway && go mod tidy && go run cmd/general/main.go # do the same for sc-user, sc-post, sc-notification
make proto-generateor Makefile commands when regenerating gRPC code from theprotodirectory. - Start Kafka (if required by the services):
docker compose up zookeeper kafka-broker sc-kafka -d
- Launch the web client:
The application runs at http://localhost:3000 and calls the API gateway at http://localhost:8000.
cd sc-webapp npm install # or pnpm install / yarn npm start
- Go services:
cd sc-auth && go test ./... cd sc-api-getaway && go test ./...
- Web client:
cd sc-webapp npm test
Each service exposes utility commands. Example for sc-auth:
make install # Install dependencies (go mod tidy)
make start # Run the service (go run ...)
make test # Execute tests (go test ./...)
make proto-generate # Generate gRPC code from proto/auth.proto- All proto files live in the
proto/directory. Regenerate gRPC clients and servers after modifying contracts. - The default Kafka setup creates
post.created,subscription.created, andnotification.createdtopics. Override them viasc-kafkaenvironment variables if required. - For easier debugging, use
docker compose logs -f <service>anddocker compose exec <service> shto inspect logs and access running containers.
Happy building and sharing on Soul Connect! π«Ά