The Portal Backend is a Flask API application written in Python that serves as the communication layer between the frontend and various backend services. It facilitates user management, team/organization account management, endpoint generation, retrieval of supported chains, and analytics data.
-
User Account Management:
- Allows for the creation and management of user accounts.
- Data stored in the
users
table in the MySQL database.
-
Team/Organization Account Management:
- Facilitates the creation and management of team/organization accounts.
- Information stored in the
organisation
table in the MySQL database.
-
Endpoint Generation:
- Generates endpoints for various functionalities.
-
Supported Chains:
- Returns a list of supported chains.
- Data retrieved from the
chains
table in the MySQL database.
-
Usage Analytics:
- Provides usage analytics data.
- Cached past usage data stored in the
analytics_cache
table in the MySQL database. - Connects to a Prometheus server to serve analytics/usage info.
The application is connected to a MySQL database with the following tables:
- users: Holds user information.
- organisation: Holds organization/team info.
- api_keys: Holds API key info.
- analytics_cache: Cache of past usage data.
- chains: Holds supported chains.
- Python: Programming language used for backend logic.
- Flask: Web framework for building the API endpoints.
- MySQL: Relational database for storing application data.
- Prometheus: Monitoring and analytics tool for serving usage analytics data.
- Install Python and required dependencies.
- Set up a MySQL database and configure database connection details in the application.
- Install and configure Prometheus server for serving analytics data.
- Deploy the Flask API application.
Detailed API documentation including endpoints, parameters, and responses can be found in the Swagger specification provided in the codebase.
For any inquiries or support, please contact [email protected].