Discount AmongUs is made to use for local businesses that own different locations. Usually, an employee can get a discount at any location under the same company and it should apply the same in the restaurant industry as well. However, there is no single application out there that does this job yet. From a personal experience, it felt like there should be one for restaurant businesses and their employees. Because workers from location A do not know workers from location B so that it is hard to recognize each other and ask for a discount even though they work for the same company. Hence, there should be a convenient way of recognizing each other for a discount. In order to solve this problem, our group came up with this app called Discount AmongUs, which is simple and convenient to use for both sides. Employees get registered by their store manager and pull up their phones for a discount in different locations and get verified with their email, which shows their place of work. Owners can add and remove store managers and store managers can add and remove their employees.
Client
:
- npm install
- npm start
Server
:
-
make virtual env: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
-
activate the virtual env you created
-
install requirements.txt: pip install -r requirements.txt
-
run this command to make package on the root dir: pip install -e .
-
make .env file in the following dir server/config/ The .env should have the following virables with your postgres info
Example:
POSTGRES_URL="127.0.0.1:5432" POSTGRES_USER="postgres" POSTGRES_PW="password" POSTGRES_DB="amongus"
-
run server: a. cd server b. python app.py
For Server The following is Required
:
Flask==1.1.2
Flask-SQLAlchemy==2.4.1
flask-cors
python-dotenv
pyjwt==1.4.2
Psycopg2==2.8.4
SQLAlchemy==1.3
For Client The following is Required
:
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"axios": "^0.21.0",
"bootstrap": "^4.5.3",
"jwt-decode": "^3.1.2",
"react": "^17.0.1",
"react-bootstrap": "^1.4.0",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.0",
"web-vitals": "^0.2.4"
}
The application will store user, items, and orders.
- Users can have many businesses.
- Business can have many employees.
- Employees can work for multiple businesses.
An Example User
:
{
email: "test@test.com",
first_name: "first",
userID: 1,
last_name: "last"
}
An Example Business
:
{
address: "123 lex ave",
city: "new york",
name: "test",
owner: 1, // References a userID
state: "new york",
zipcode: 12345,
businessID: "test-id"
}
An Example Business Employees
:
{
businessID: "123-jkl", // References a businessID
results: [
{
email: "test2@test.com",
first_name: "first",
last_name: "last"
},
{
email: "test3@test.com",
first_name: "first",
last_name: "last"
}
]
}
- As a user, I can signup to be owner
- As a user, I can login
- As an owner, I can add business
- As an owner, I can remove business
- As an owner, I can add employees
- As an owner, I can remove employees
- As an owner, I can view my businesses
- As an employee, I can check for discounts
- https://github.com/Fall-2020-Website-Design/FindLoveNow
- https://dev.to/aminu_israel/using-json-web-token-jwt-with-python-3n4p
- https://pyjwt.readthedocs.io/en/stable/
- https://flask-sqlalchemy.palletsprojects.com/en/2.x/queries/#querying-records
- https://github.com/Sanjeev-Thiyagarajan/PERN-STACK-DEPLOYMENT
Edgar Dor Hyunmin