a simple and responsive grocery crud application with smooth animations, and a clean ui.
- crud functionality: add, edit, and delete grocery items.
- database integration: uses pymongo with mongodb atlas for data storage.
- ui/ux: clean and responsive interface with smooth transitions powered by framer motion.
- notifications: toast notifications for user actions.
- deployment: frontend hosted on vercel; backend on render.
- ui bug: after editing an item, it briefly shifts position before moving back to its original spot.
- flask & pymongo: first experience using flask with pymongo to handle crud operations.
- http requests: learned to use axios for http requests & resolved challenges with axios delete, which does not accept a data parameter (used query strings instead).
- jsonify responses: realized all api responses must be jsonified for crud operations to work correctly.
- inline editing: implemented in-line editing for grocery items.
- deployment: successfully deploying this project. the hard part was making mongodb atlas functional, but it was worth the effort.
# backend configuration
VITE_BACKEND_URL=
# flask configuration
FLASK_ENV=production # not in use, kept for reference.
# mongodb atlas configuration
MONGO_URI=
USERNAME= # not in use, kept for reference.
PASSWORD= # not in use, kept for reference.
DATABASE=
COLLECTION=
# frontend configuration
FRONTEND_URL=
to get the project up and running on your local machine, follow these steps:
- clone the repository:
git clone https://github.com/barbaraeguche/cartdash.git
- navigate to the project directory:
cd cartdash
-
run the backend:
- navigate to server directory:
cd server
- install and activate virtual environment:
python3 -m venv venv source ./venv/bin/activate
- run the flask app:
python3 app.py
- open http://127.0.0.1:5000 with your browser.
-
run the frontend:
- navigate to client directory:
cd client
- install dependencies:
pnpm install
- start the development server:
pnpm run dev
- open http://localhost:5173/ with your browser.