Project By: Tiffany Fu, Daniel Sooknanan, Dante Betancourt, Solayjon Ollanazarov
Team Discovery
Wireframe
EcoWare API Endpoint Documentation
EcoWare Marketing Plan
Note : user_app branch has the fully functioning user app
Clone the repo
git clone https://github.com/sookiemonster/Fitch-Codeathon ecoware
cd ecoware
Database
We used PostgreSQL for our database with Prisma ORM.
How to setup
-
Install PostgreSQL For Linux
sudo apt install postgresqlFor macOS (Homebrew)
brew install postgresql -
Start PostgreSQL For Linux
sudo service postgresql startFor macOS (Homebrew)
brew services start postgresql -
Create a User and Database Log into the PostgreSQL shel:
sudo -u postgres psqlCreate a new user and database:
CREATE USER myuser WITH PASSWORD 'mypassword'; CREATE DATABASE mydb OWNER myuser; -
Integrate Prisma Create a new .env file inside the server folder with the connection URL:
DATABASE_URL="postgresql://myuser:mypassword@localhost:5432/mydb"
Backend Server
-
Go to the server folder
cd server -
Install all the necessary packages
npm install -
Generate the Prisma client and seed the database:
npm run prisma -
Run the server
npm run server(runs on port 5000)
(Optional)
- GUI for the database
(runs on port 5555)
npm run studio
Washer Dashboard
-
Go to the web-client folder
cd web-client -
Install all the necessary packages
npm install -
Run the web client
npm run start(runs on port 3000)
Vendor Web Dashboard
-
Go to the next-web folder
cd next-web -
Install all the necessary packages
npm install -
Run the web client
npm run dev(runs on port 3010)
User Mobile App
-
Go to the frontend-mobile-user
cd frontend-mobile-user -
Install all the necessary packages
npm install -
Create a new .env file inside the frontend-mobile-user folder with the IP and PORT where the backend server is running:
EXPO_PUBLIC_ADDRESS = "<ip_address>:<port>"ip_address cant be localhost port should be 5000 ( unless u changed the server port ) dont include 'http://' or '/' after the port -
Run the mobile client
npx expo start(runs on port 8081)
-
Follow the instructions on the terminal
Vendor Mobile App
-
Go to the frontend-mobile-vendor
cd frontend-mobile-Vendor -
Install all the necessary packages
npm install -
Create a new .env file inside the frontend-mobile-user folder with the IP and PORT where the backend server is running:
EXPO_PUBLIC_ADDRESS = "<ip_address>:<port>"ip_address cant be localhost port should be 5000 ( unless u changed the server port ) dont include 'http://' or '/' after the port -
Run the mobile client
npx expo start(runs on port 8082)
-
Follow the instructions on the terminal
Test Accounts
Vendors : login : v1@t.com password: test1
login : v2@t.com password: test2
login : v3@t.com password: test3
Users : login : u1@t.com password: test1
login : u2@t.com password: test2
login : u3@t.com password: test3