This is a web application for managing HEWL's office supplies. The app allows users to add, update, and delete supplies.
- List all office supplies
- Add new supply items with images
- Update the quantity of existing supplies
- Delete supplies from inventory
- Image upload to Cloudinary
- Email notifications via SendGrid
- User activity logging
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.6+
- Node.js 12+
- npm or yarn
- pip
-
Clone the Repository:
git clone https://your-repository-url.git cd your-project-backend
-
Set Up a Python Virtual Environment (Optional):
virtualenv venv source venv/bin/activate # On Windows use `venv\\Scripts\\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Environment Configuration:
Create a
.env
file in the root of the backend directory and add the following variables:FLASK_APP=app.py FLASK_ENV=development DATABASE_URL_REAL=<your-database-url> SENDGRID_API_KEY=<your-sendgrid-api-key> SENDGRID_EMAIL=<your-sendgrid-email> CLOUDINARY_CLOUD_NAME=<your-cloudinary-cloud-name> CLOUDINARY_API_KEY=<your-cloudinary-api-key> CLOUDINARY_API_SECRET=<your-cloudinary-api-secret>
-
Initialize and Migrate Database:
flask db upgrade
-
Run the Backend Server:
flask run
-
Navigate to the Frontend Directory:
Assuming it's a separate directory within the same repository:
cd ../your-project-frontend
-
Install Node Modules:
npm install # or yarn
-
Run the Next.js Development Server:
npm run dev # or yarn dev
The frontend will be available at
http://localhost:3000
.
- Access the frontend using the URL provided by the Next.js development server.
- Use the Flask API endpoints for managing the inventory.
Deployed using Heroku: https://hewl-inventory-tracker-5f0d7eb70170.herokuapp.com/