git clone git@github.com:COSC-499-W2023/year-long-project-team-8.git
cd year-long-project-team-8
python -m venv venv
venv/Scripts/activate
source venv/bin/activate
drf
directory
cd app/drf
pip install -r requirements.txt
backend
cd backend
.env
file and add your EMAIL_HOST_PASSWORD
for SendGrid API key and SECRET_KEY
for your Django project (Ask us what this is by emailing passtheplate9@gmail.com
)python manage.py makemigrations
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
python manage.py runserver
http://127.0.0.1:8000/
http://127.0.0.1:8000/admin/
python manage.py createsuperuser
frontend
and backend
servers can be launched with from project root
with:
./startservers.bat
chmod +x startservers.sh
./startservers.sh
How to run:
Configure the front end, see frontend instructions and install expo go on the device, navigate to \app\drf\front-end
and run:
npx expo start
Scan the QR code and pass those plates
passtheplate9@gmail.com
git clone git@github.com:COSC-499-W2023/year-long-project-team-8.git
cd year-long-project-team-8/app/drf/front-end
npm install
.env
file at the root of the project directory and add your GOOGLE_API_KEY
front-end
npx expo start
npx expo start
where it says exp://<your-ip>:8000
app/drf/front-end/config.js
export const baseEndpoint
<your-ip>
into baseEndpoint https://<your-ip-here>:8000/api
a
in the terminali
in the terminal.?
in the terminal while the Expo server is running to see a list of all available commands.passtheplate9@gmail.com
HTTP | Endpoints | Action |
---|---|---|
POST | /api/products | Create a new product |
GET | /api/products | Retrieve a list of all products |
GET | /api/products/?search=${query} | Search for products with a query |
GET | /api/products/?categories=${categories} | Filter products by category |
GET | /api/product/${productId} | Get product details |
PATCH | /api/product/${productId} | Update product details |
DELETE | /api/product/${productId} | Delete a product |
GET | /api/products/?owner=${userId} | Receive products linked to the owner |
GET | /api/users | Get user list |
POST | /api/users | Create a new user |
GET | /api/users/${userId} | Get user details |
PATCH | /api/users/${userId} | Update user details |
DELETE | /api/users/${userId} | Delete a user |
GET | /api/my-products | Get user-owned products |
GET | /api/images | Get images associated with a product |
POST | /api/reviews | Submit a review |
POST | /api/token | Validate login credentials and receive tokens |
POST | /api/token/verify | Verify current tokens |
POST | /api/token/refresh | Refresh access token |
POST | /api/auth/change-password | Send password reset code |
PATCH | /api/save_posts | Toggle saved post for user |
GET | /api/chat/list | Get list of chat instances |
GET | /api/chat/${chatId} | Get chat messages for chat instance |
POST | /api/chat/${chatId} | Send chat messages for chat instance |