A complete microservice application built with Lumen (PHP), Node.js (TypeScript), Redis, MySQL, and a React frontend. The stack is containerized with Docker and deployed using Coolify.
- No Longer Hosted
- Frontend (React + Vite): SPA for registration, login, and posts.
- Backend #1 (Lumen, PHP): REST API with JWT authentication, migrations, password hashing, and Redis-backed caching.
- Backend #2 (Node.js, TS): GraphQL API + Swagger docs, serving posts with Redis caching.
- Database: MySQL (
users
,posts
tables). - Cache: Redis for fast retrieval of posts (with 60 second cache)
- Reverse Proxy: Nginx routes
/api
→ Lumen,/graphql
+/docs
→ Node, SPA fallback for React. - Deployment: Docker + Coolify.
- 60 second redis cache where applicable
Method | Endpoint | Description |
---|---|---|
POST | /api/register |
Register a new user (name, email, password) |
POST | /api/login |
Authenticate and return JWT |
GET | /api/posts |
Get all posts (cached in Redis) |
POST | /api/posts |
Create a new post (JWT required) |
GET | /api/posts/{id} |
Get single post (cached in Redis) |
Query | Example |
---|---|
posts |
Fetch all posts (cached globally) |
post(id: ID!) |
Fetch single post (cached) |
- Register & log in
- List posts.
- Add new posts.
- Styled with a dark UI theme.
- PHPUnit for Lumen routes & auth.
- Jest + Supertest for Node GraphQL API.
- Docker & Docker Compose
- Node 20+ (for local frontend dev)
- PHP 8.2+ (if running Lumen outside Docker)