The React Native App Builder is an FastAPI-based service that automates the build process for React Native applications. It supports both Android and iOS builds by leveraging Docker containers to ensure a consistent, scalable, and secure build environment.
- Automated Build Execution: Trigger builds via API calls for Android and iOS platforms.
- Dockerized Environment: Ensures consistency and eliminates dependency issues.
- Project-Specific Configurations: Dynamically injects environment variables into the build process.
- Build Logging & Retrieval: Stores logs per project, accessible via API.
- Secure & Scalable: Designed to be deployed in production environments with cloud-native architectures.
The application follows a microservices-oriented approach with FastAPI as the backend framework. It integrates with:
- Docker Compose for isolated and reproducible builds.
- Persistent Logging for tracking build progress and debugging.
- Project Configuration Management to customize builds per project.
Endpoint: POST /build/{project_id}/{platform}
Description: Initiates a build for the given project and platform.
Parameters:
project_id(string): Unique identifier of the project.platform(string): Eitherandroidorios.
Response:
{
"message": "Build for project {project_id} ({platform}) started",
"logs": "...initial logs..."
}Endpoint: GET /logs/{project_id}
Description: Fetches the latest build logs for a specific project.
Parameters:
project_id(string): Unique identifier of the project.
Response:
{
"logs": "...build logs..."
}- Docker & Docker Compose installed on the system.
- Python 3.8+ with FastAPI dependencies.
- Clone the repository:
git clone https://github.com/sduf-net/sdufAppBuilder.git cd sdufAppBuilder - Install dependencies:
pip install -r requirements.txt
- Start the API server:
uvicorn main:app --host 0.0.0.0 --port 8000
Environment variables used in the build process:
URL- React Native project repository URLAPP_ENV- Project environment (e.g., staging, production)SOCKET_PROJECT_TOKEN- Authentication token for the projectSOCKET_PROJECT_ID- Unique project identifierstyleURL- Map styling URL (if applicable)APP_NAME- Application display nameAPP_PACKAGE_NAME- Application package identifier
- Environment Variables: Ensure sensitive values are stored securely and not hardcoded.
- Docker Isolation: Each build runs in an isolated container to prevent conflicts.
- Access Controls: API authentication and authorization mechanisms should be implemented for production.
This project is licensed under the MIT License. See the LICENSE file for details.