Flatiron Hackonomics 2024
Team 10 The Ledger Ends
Running the App on a Mac:
-
Download Xcode from the App Store
- This is necessary to use the iOS Simulator, allowing you to test iOS apps directly on your Mac.
-
Open Terminal
-
Navigate to Project Directory cd frontend
-
Install Necessary Packages
- Run the following command to install all required packages (if this is your first time or if there are any updates): npm install
-
Start Your Project with Expo
- Enter the following command to start your project: npx expo start
- A QR code and some commands will appear in your terminal window.
-
Open the App in iOS Simulator
- Press 'i' to launch the app in the iOS Simulator.
Running the App on an iPhone:
-
Download Expo Go from the App Store
- This app allows you to run your project directly on your iPhone for testing.
-
Scan the QR Code with Your iPhone Camera
- Open the Camera app on your iPhone and scan the QR code displayed in the terminal after starting your project with Expo.
- This will automatically prompt you to open the project in Expo Go.
Good luck! If you encounter any issues, don't hesitate to message Landon for help.
-
Navigate into the backend folder
-
Set up your .env file:
- Within the backend folder, run
touch .env
in your terminal to create the .env file - Inside the
.env
file, add two variables:APP_SECRET=
andJWT_SECRET_KEY=
- In your terminal, type
python
and press enter to enter a python environment. Run the following commands:import secrets
andprint(secrets.token_hex())
- Copy the output and paste it after the
=
. It should look something likeAPP_SECRET=f440a395514e01d80d85c94c4d711cc7ddbbb8073e0e5e9541c005045fc75ef7
- Repeat for
JWT_SECRET_KEY
(Should be different than APP_SECRET)
- Within the backend folder, run
-
Initialize the database:
- Make sure you are within the backend folder: (run
cd backend/
) - Run the following commands:
export FLASK_APP=app.py
andexport FLASK_RUN_PORT=5555
flask db init
flask db migrate -m 'initial migration'
flask db upgrade head
- Then run
python seed.py
to seed the data
- Make sure you are within the backend folder: (run
-
Start the server:
- To start the server, run
python app.py
within the backend folder
- To start the server, run