System Architecture & Technology Stack
Overall Architecture Diagram
The MarsBase Platform uses a multi-layered architecture:
+----------------------+
| Frontend UI |
| (Next.js & React) |
+----------+-----------+
|
| (HTTPS API calls)
v
+---------------------------------------------------+
| Next.js API (Backend) |
| (Node.js, Express-style middleware, role checks) |
+----------+----------+-----------------------------+
| |
|(Queries) | (External APIs, Blockchain)
v v
+----------------------+ +---------------------------------+
| PostgreSQL Database | | External Integrations |
| (Structured data, | | Third-party services |
| Users, Logs) | | Blockchain networks |
+----------------------+ +--------------+-------------------+
|
v
+-----------------------------+
| IPFS + Cloudflare R2 (Docs) |
| (doc storage & distribution)|
+-----------------------------+
- Frontend: Built with Next.js (React + TypeScript) for a user-friendly interface and server-side rendering
- Backend: Next.js API routes provide REST-like endpoints, hosting business logic, user auth, role checks, etc.
- Database: PostgreSQL for relational data (user profiles, structured data, status records)
- Storage: Large file storage & distribution via IPFS (for immutability) + Cloudflare R2 (S3-like)
- Integrations: External service providers, blockchain networks for smart contract interactions
This architecture ensures clean separation of concerns, scalability, and maintainable code structure.