⚡ Status: Currently under active development.
TeleQueue is a high-performance distributed queue and appointment scheduling system being built with NestJS, Kafka, PostgreSQL, Elasticsearch, and Rust. It is being designed to handle large-scale, real-time processing with strict ordering and fault tolerance. For real life scenario where booking request spikes the moment booking is opened.
- Distributed Sequencer: Powered by Rust (Raft-based) to guarantee globally unique, strictly ordered sequence IDs.
- Event-driven Architecture: Kafka as the backbone for reliable message streaming.
- Microservices: Modular services like
api-gateway,appointments, andqueues. - Elasticsearch Integration: Real-time indexing and advanced search queries.
- PostgreSQL Database: Primary relational storage for transactional data.
- Dockerized Environment: Ready-to-run with
docker-compose. - Scalable Design: Horizontal scaling via Kafka partitions and microservices.
- Backend: NestJS, TypeScript
- Messaging: Kafka
- Database: PostgreSQL
- Search Engine: Elasticsearch
- Rust: Raft-based distributed sequencer
- Containerization: Docker & Docker Compose
[ API Gateway ] <---> [ Appointments Service ]
| |
| v
| [ Queues Service ] <---> [ Kafka ]
| |
| v
| [ PostgreSQL / Elasticsearch ]
|
v
[ Clients (REST) ]
git clone https://github.com/tsabudh/telequeue.git
cd telequeueCreate .env files in each service (e.g., apps/api-gateway/.env) with appropriate values:
Create .env apps/appointment/.env:
HTTP_PORT=3001
Create .env apps/appointment/.env:
KAFKA_BROKER=kafka:9092
ELASTICSEARCH_URL=http://elasticsearch:9200
Create .env libs/common/src/.env:
DATABASE_URL=postgresql://telequeue_app:telequeue_pass@postgres:5432/telequeue_write_db
KAFKA_BROKER=kafka:9092
Use Docker Compose:
docker-compose up --buildThe API gateway will be available on:
- API Gateway:
http://localhost:3001
- api-gateway: Entry point for clients (REST/GraphQL).
- appointments: Manages appointment scheduling.
- queues: Handles queue management and distributed sequencing. (in development)
- postgres: Database for transactional data. (in development)
- kafka: Message streaming backbone.
- elasticsearch: Full-text search and analytics. (in development)
Run any service in watch mode:
Syntax
npm run start:dev -- apps/{service-name}Example
npm run start:dev -- apps/api-gatewayTo run database migrations (if using TypeORM):
npm run typeorm migration:runnpm run test
npm run test:e2e
npm run lintWe welcome contributions! Please:
- Fork the repo.
- Create a feature branch.
- Submit a pull request.
This project is licensed under the MIT License.
- Integrate gRPC communication between microservices.
- Implement Raft-based leader election for the Rust sequencer with horizontal scaling.
- Add monitoring and observability (Prometheus + Grafana).
- Improve horizontal scalability with Kafka partition optimization.
- Enhance API Gateway with GraphQL Federation and caching.
- Add authentication & authorization (OAuth2 / JWT).
- Automate Kafka topic management and monitoring.
- Set up CI/CD pipeline (GitHub Actions / GitLab CI).