Home - mostpros1/repository GitHub Wiki

Mostpros

Introduction

Welcome to the Mostpros Wiki! This document serves as the central repository for all information related to the Mostpros codebase. Here, we maintain detailed documentation, installation guides, usage examples, and more to help both new and existing team members work effectively with the project.

Table of Contents

Getting Started

Installation

Repository - Mostpros Project

Purpose

This repository contains the code for the Mostpros project. The following instructions will guide you through setting up and running the project locally.

Prerequisites

Installation

Clone the Repository

To get the code onto your machine, run the following commands:

git clone https://github.com/mostpros1/repository.git
cd repository

Getting Started

Backend Setup

Our backend is cloud-based and uses AWS Amplify. To get the backend up and running on your system, follow these instructions:

  • Install the Amplify CLI globally with the following command: npm install -g @aws-amplify/cli
  • After installing the CLI, running amplify -v will return the version number. Use this to check if the install went well. Example of an output from a successful install: 12.10.1
  • Depending on whether you're working on the web app or the mobile app, navigate to the corresponding folder using cd web or cd Mostprosapp, respectively.

Hint: Before running the upcoming command, ask for the login credentials to the Mostpros AWS account.

  • Ask for the login details to the Mostpros AWS account. Once you have the credentials, install the Amplify backend configuration using the following command: amplify pull --appId d2j290dx5bs7ht --envName acceptance If this fails, try removing the folders named amplify and rerun the command.

You may also use the shortened version amplify pull if you already have the Amplify backend on your system. Note: After running amplify pull, the files may end up in /web instead of /web/src. If that is the case, move the relevant files (aws-exports.js and amplifyconfiguration.json) to the /web/src folder.

For web developers:

  1. Assuming you are currently in the base folder for the repository, navigate to the correct folder by running cd web.
  2. Put the backend files on your system by running the pull command listed above.
  3. Running step 2's command will prompt you to fill in some inputs:
  • Choose your default editor: Select None.
  • Choose the type of app that you're building: Javascript.
  • What type of Javascript framework are you using: react
  • Source directory path: src
  • Distribution Directory Path: dist
  • Build Command: Leave this as is.
  • Start Command: Leave this as is.
  • Do you plan on modifying this backend: Yes

For app developers:

  1. Assuming you are currently in the base folder for the repository, navigate to the correct folder by running cd Mostprosapp.
  2. Put the backend files on your system by running the pull command listed above.
  3. Running that command will prompt you to fill in some inputs:
  • Choose your default editor: Select None.
  • Choose the type of app that you're building: Javascript.
  • What type of Javascript framework are you using: react-native
  • Source directory path: app
  • Distribution Directory Path: Leave this as is.
  • Build Command: Leave this as is.
  • Start Command: Leave this as is.
  • Do you plan on modifying this backend: Yes

Start the application

  • While still in the respective folder, install the NPM packages using npm install.

  • To start the frontend locally:

npm run dev
  • To start the app locally:
  1. Download Expo (Go) on the Play Store or on the App Store
  2. Run the following command and scan the QR code that pops up in the terminal using the Expo (Go) app:
npm start

You should now have everything set up locally. Open your browser and navigate to http://localhost:5173 (or the relevant port if it differs), to view the frontend of the application.