Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/barbaraeguche/cartdash

๐Ÿงบ a minimal grocery shopping application built with react + flask.
https://github.com/barbaraeguche/cartdash

framer-motion grocery mongo-atlas render toast vercel vite

Last synced: 18 days ago
JSON representation

๐Ÿงบ a minimal grocery shopping application built with react + flask.

Awesome Lists containing this project

README

        

# cartdash ๐Ÿงบ
a simple and responsive grocery **crud** application with smooth animations, and a clean ui.

## features ๐Ÿ‘พ
- **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.

## limitations ๐Ÿšจ
- **ui bug:** after editing an item, it briefly shifts position before moving back to its original spot.

## what I learned ๐Ÿ’ญ
- **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.

## .env file ๐Ÿ“„
### `client/env`
```dotenv
# backend configuration
VITE_BACKEND_URL=
```

### `server/env`
```dotenv
# 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=
```

## running the project ๐Ÿ
to get the project up and running on your local machine, follow these steps:

- **ensure [python](https://www.python.org/downloads/) and [node.js](https://nodejs.org/en) are installed.**
1. **clone the repository:**
```bash
git clone https://github.com/barbaraeguche/cartdash.git
```

2. **navigate to the project directory:**
```bash
cd cartdash
```

3. **run the backend:**
1. **navigate to server directory:**
```bash
cd server
```
2. **install and activate virtual environment:**
```bash
python3 -m venv venv
source ./venv/bin/activate
```
3. **run the flask app:**
```bash
python3 app.py
```
4. open [http://127.0.0.1:5000](http://127.0.0.1:5000) with your browser.

4. **run the frontend:**
1. **navigate to client directory:**
```bash
cd client
```
2. **install dependencies:**
```bash
pnpm install
```
3. **start the development server:**
```bash
pnpm run dev
```
4. open [http://localhost:5173/](http://localhost:5173/) with your browser.

## gallery ๐Ÿ“ธ

showcase