System Architecture

The Global PRS is built with a layered architecture that separates concerns and allows each component to scale independently. This design ensures stability, flexibility, and maintainability across the entire system.

Architecture Overview

System Layers

Database Structure

The database is laid out to efficiently manage events (programs), registrations, and forms, with relationships connecting the event-related data to the forms and flows required for participant registration and management.

Database Layout and Relationships

  • Event Model: Central to the database, connected to multiple tables like EventFlow, EventTicket, EventCategory, etc., through one-to-many relationships.
  • EventFlow and EventFlowStep: Define the participant flow for an event, with each EventFlow containing multiple EventFlowStep records.
  • Form Models: Organize the structure of forms, with FormForm containing pages (FormPage), and pages containing sections (FormSection). Sections hold fields (FormField), and fields may have associated choices.
  • Registration Data: Captured via the EventRegistrationMixin, connecting participant details to events and flows.
For detailed database documentation, visit: PRS Database Documentation

Technology Stack

SystemTechnologyVersionDeployment
DatabasePostgreSQL16.4AWS RDS (Managed)
APILitestar2.21.1AWS ECS (Docker)
BackendOdoo17.0CloudPepper (Managed)
FrontendReact18.3.1Netlify (yarn)
WorkerCelery5.4.0AWS ECS (Docker)
CacheRedis5.1.0AWS EC2 (Docker)

DevOps Infrastructure

The Global PRS uses a comprehensive DevOps setup to ensure reliable deployment, monitoring, and maintenance.

Additional Systems

  • Datadog: For audit logging and monitoring
  • Mixpanel: For analytics tracking
  • Freshdesk: For support ticket management
  • ClickUp: For project management
  • OpenAPI: For API documentation generated by Litestar
  • AWS S3: For artifact storage
  • Jenkins: For CI/CD pipelines

Security Architecture

Security is a critical aspect of the Global PRS, with multiple layers of protection to ensure data integrity and user privacy.
1

Authentication

  • JWT (JSON Web Tokens): Issue signed JWTs for secure, stateless authentication between clients and the API.
  • Role-based Access Control (RBAC): Implement RBAC to restrict access based on the user’s role or permissions.
2

API Gateway

  • Rate Limiting and Throttling: Limit the number of requests from a client to prevent abuse (DDoS protection).
  • Load Balancing: Distribute traffic across multiple API instances for stability and high availability.
  • IP Whitelisting/Blacklisting: Restrict access to the API based on IP addresses or ranges.
3

Data Encryption

  • Transport Layer Security (TLS/SSL): Enforce HTTPS to ensure data is encrypted during transit.
  • Data Encryption at rest & transport (optional): For sensitive data like Aadhaar card information.
4

Input Validation

  • Input Validation: Strictly validate incoming API requests for expected data types, lengths, and formats.
  • Cross-Site Scripting (XSS) Prevention: Escape or sanitize data that might be reflected back to the user.
  • Cross-Site Request Forgery (CSRF) Protection: Implement CSRF tokens for APIs that modify state.
5

Audit Logging

  • Access Logs: Log every API request with details like IP address, user-agent, user ID, endpoint accessed, and time.
  • Audit Trails: Keep logs of sensitive operations for accountability and tracking.

Security Tools

  • Isha SSO: For login and authentication
  • Cloud-flare: For Web Application Firewall (WAF)
  • DataDog: For audit, logging, and monitoring

Next Steps