Skip to content

adegbite17/ZebraStore-API

Repository files navigation

ZebraStore (React + Flask) Full‑stack ecommerce sample with a React frontend and Flask API backend. Live app: https://zebra-store.net/ Backend (Render): https://zebrastore-api.onrender.com/api Monorepo layout backend/ — Flask API (auth, products, orders, password reset, paymentgateway, cart) zebrastore-frontend/ — React app (MUI, routing, API client) render.yaml — Render service config Tech stack Frontend: React, React Router, MUI Backend: Python, Flask, Gunicorn, Flask‑CORS Package managers: npm, pip Features Auth: register, login, logout Products: browse, search Cart and checkout Orders history Admin product and order management Password reset flow (request code + reset with code) Screenshots added_to_cart_successfully admin_dash_delete_product admin_dash_edit admin_dash_orderitem_details admin_dash_search_order admin_dash_update admin_dash_update_orderstatus admin_login admindashboard after_login cart_page checkoutpage forgotpassword home_product_page login_page login_to_add_to_cart order_history payment_gateway paymentcallback register_page reset_password zebra_searchbar

Getting started (local) Prerequisites: Node 18+ Python 3.11+ (virtualenv recommended) Clone: git clone https://github.com/adegbite17/ZebraStore-API.git cd ZebraStore-API Backend Using pip:

create venv

python -m venv .venv

activate (Windows)

..venv\Scripts\activate

install deps

pip install -r requirements.txt

set env (PowerShell)

$Env:FLASK_ENV="development"

run

python run.py Default server runs on http://127.0.0.1:5000.

.env.example

SQLALCHEMY_DATABASE_URI='uri' SECRET_KEY='key' FLUTTERWAVE_SECRET_KEY='key' FLUTTERWAVE_PUBLIC_KEY='key' FLUTTERWAVE_BASE_URL='url' SQLALCHEMY_TRACK_MODIFICATIONS=False JWT_SECRET_KEY='key' JWT_HEADER_NAME='Authorization' JWT_HEADER_TYPE= 'Bearer' JWT_IDENTITY_CLAIM='sub' SMTP_SERVER ='smtp.gmail.com' FLASK_ENV='production' SMTP_PORT=58790 EMAIL_USER ='email' EMAIL_PASSWORD ='password' ALLOWED_ORIGINS='url' url='url' Frontend cd zebrastore-frontend npm install npm start The app runs on http://localhost:3000. Forgot‑password on Render free tier Symptom in logs: Error sending email: [Errno 101] Network is unreachable and/or worker timeouts during /api/forgot-password. Cause: Render free tier restricts outbound SMTP egress; direct SMTP (smtplib to ports 25/465/587) may fail intermittently or be blocked. Status: The app works locally; in free tier production, email sending for forgot‑password is unreliable.

About

A scalable e-commerce API

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published