This project is a template for deploying a Parse Server application on Back4App, with a React client built using Vite. The backend is designed to be easily deployable and includes a Docker setup for local development.
To enable the deployment process for this project, you need to configure three secrets in your GitHub repository. These secrets are required for authentication and proper integration with the deployment system.
-
B4A_EMAIL
The email address associated with your B4A account. -
B4A_APP_ID
The application ID of your B4A project. -
B4A_ACCOUNT_KEY
The account key for your B4A account.
- Go to your GitHub repository.
- Navigate to Settings > Secrets and variables > Actions.
- Click on New repository secret.
- Add each secret with its corresponding name and value:
B4A_EMAIL
B4A_APP_ID
B4A_ACCOUNT_KEY
- Save each secret.
After setting up the secrets, simply create a new release in your GitHub repository. This will trigger the deployment process, and your project will be deployed to Back4App.
The client-side application for this project is located in the /client
directory. This directory contains the source code for the React application, which is built using Vite for fast development and optimized builds. The application serves as the front-end interface for interacting with the Back4App backend.
Key files and directories in /client
:
src/
: Contains the main application code, including components, styles, and assets.public/
: Holds static assets that are served directly without processing.vite.config.ts
: Configuration file for Vite, specifying build and development settings.package.json
: Defines project dependencies, scripts, and metadata.
To start the development server, navigate to the /client
directory and run npm run dev
. This will launch the application locally with hot module replacement (HMR) enabled.
To test the backend locally, follow these steps:
-
Start MongoDB using Docker Compose
Navigate to the root directory of the project and run the following command to start a MongoDB instance:docker-compose up -d
-
Install Backend Dependencies
In the root directory, install the required backend packages by running:npm run install-backend-packages
-
Start the Parse Server
After installing the dependencies, start the Parse Server by running:npm run server
Once the server is running, your Parse Server will be available locally for development and testing.