Internal project · Backend systems
Multi-tenant platform: gateway, identity, billing and leads
The shared platform behind EasyDev's own applications: one gateway, one identity service, payments and enquiry handling.
Overview
A set of services that give several applications the same sign-in, permissions, subscription billing and enquiry management, behind a single public API. This website's enquiry system runs on it.
Business context
EasyDev's applications share the same needs: sign-in, roles and permissions, subscription payments, notification email, file storage and an enquiry inbox. The platform provides them once, behind one API.
The problem
Each application needed accounts, roles, billing and a way to receive enquiries. Rebuilding those inside every product would have meant inconsistent security and duplicated work.
The technical challenge
Keep tenants isolated and permissions consistent across independently deployed services, while payment confirmation stays fast and every payment operation is safe to retry.
Solution approach
A gateway routes requests to focused services for identity, payments, enquiries, email and file storage. Each service owns its data and checks permissions itself; background queues take slow work out of the request.
Objectives
- One public entry point for every application, with sessions verified once
- Roles and permissions managed in one place and enforced in every service
- Payments that are safe to retry and do not slow the confirmation response
- Enquiry data handled as personal data: encrypted, searchable and auditable
Key features
- Accounts, roles and permissions with tenant separation
- Subscription billing through Razorpay and Stripe, with idempotent payment operations
- Enquiry management with a pipeline, notes, follow-ups and encrypted contact details
- Notification email with retries and a recorded outcome per enquiry
- File storage on AWS S3
Technical architecture
Swipe sideways to see the full diagram
Implementation approach
- 01A single public gateway verifies sessions and routes requests to dedicated services, so browsers only talk to one origin.
- 02Identity and permissions live in one service. Downstream services still check permissions themselves rather than trusting the gateway alone.
- 03Payment operations use idempotency keys so a retried request cannot charge or record twice; slow work such as invoice generation runs in background queues.
- 04Enquiry data (email, phone, message) is encrypted at rest and remains searchable by exact email through a keyed index.
- 05Each service is containerised and configured through environment variables.
Engineering challenges and decisions
Choices that shaped the system, and why they were made.
- 01
Authorise inside every service
The lead service originally relied on the gateway's login check. A review showed a customer account could reach admin routes. Permission checks now live in the service itself, with tests that fail if the check is removed.
- 02
Move slow work out of the request
Payment verification used to wait for invoice PDF generation and email. That work now runs in a BullMQ queue so the confirmation response stays fast.
- 03
Encrypt personal data without losing search
Emails are encrypted with a random IV, which makes them unsearchable. A keyed hash of the normalised email supports exact lookups without storing the address in plain text.
- 04
Never lose an enquiry to an email failure
The enquiry is stored first. Notification emails are retried once and their outcome is recorded on the lead, so a provider outage is visible but harmless.
Verified outcomes
No performance, revenue or user figures are published for this project, because none are documented in a form we can stand behind. What is shown here is how the system is built.
Screenshots and visual evidence
No product screenshots are published for this project. The architecture diagram above is an illustration of the design, not a screen from the application.
Lessons learned
A gateway check is not an access-control system
A review found that a customer login could reach admin routes because the service trusted the gateway alone. The fix was permission checks in the service plus tests that fail when they are removed. New services now start with that guard.
Related services
The work above is the kind of engineering these services provide.
Start with the problem
Tell us the problem. We will tell you honestly how we could help.
Describe what is slowing the business down in your own words. We reply with questions or a suggested next step. We do not promise a response time or a price before we understand the problem.