An application for tracking running routes and facilitating communication between runners via in-app chat.
Follow these steps to set up and run the project from your console.
First, navigate to the server directory.
-
Install dependencies:
npm install
-
Create an environment file:
Create a file named .env in the
serverdirectory and add the following environment variables.GEOAPIFY_API_KEY: An API key for map information. Get yours by creating an account on GeoApify.STADIA_MAPS_API_KEY: An API key for retrieving map tiles. Get yours by creating an account on Stadia Maps.COGNITO_USER_POOL_ID: The ID for your Amazon Cognito User Pool.- Process:
- Create an account on Amazon Web Services (AWS) at AWS.
- In the AWS console, navigate to the Cognito service.
- Under User Pools, click Create user pool and follow the configuration steps.
- After creation, you'll find the User Pool ID on the pool's overview page (e.g.,
us-east-1_xxxxxxxxx).
- Process:
COGNITO_CLIENT_ID: The client ID for your application in Amazon Cognito.- Process:
- Within your Cognito User Pool, go to the App clients tab.
- Click Create app client.
- Give the client a name and configure the options as needed.
- Once created, you will be provided with an App client ID. This is your
COGNITO_CLIENT_ID.
- Process:
DB_USER_NAME: The name of a PostgreSQL user with no privileges.DB_USER_PASSWORD: The password for the PostgreSQL user.DB_NAME: The name you want for the database.DB_SUSER_NAME: The name of a PostgreSQL user with admin privileges.DB_SUSER_PASSWORD: The password for the PostgreSQL admin user.
Your completed
.envfile should look similar to this (with your own keys):GEOAPIFY_API_KEY="your_geoapify_key" STADIA_MAPS_API_KEY="your_stadia_key" DB_USER_NAME="your_db_user_name" DB_USER_PASSWORD="your_db_user_password" DB_NAME="your_desired_db_name" DB_SUSER_NAME="your_db_suser_name" DB_SUSER_PASSWORD="your_db_suser_password" COGNITO_USER_POOL_ID="your_cognito_user_pool_id" COGNITO_CLIENT_ID="your_cognito_client_id"
*Note: Remember to add your env file to gitignore
- Run the server:
npm run dev
-
Install dependencies:
npm install
-
Set up a device:
You must use a physical device or create a virtual device to run the app.
-
Install native libraries:
Run the following command the first time you run the project.
- For Android devices:
npm run android
- For iOS devices:
npm run ios
- For Android devices:
-
Connect to your local server: To connect to the local server, you must specify your computer's IP address. Open ConnContext.tsx file and modify the url variable with your IP address.
-
Run the application:
After the libraries are installed in your device and your IP address is set, you can start the app with:
npm run start
-
Client:
-
Server: