A fun, colorful e-commerce proof of concept for a store run by kids aged 11-13 who sell 3D printed items!
cd backend-node
npm install
npm start
The API will start at http://localhost:8080
cd frontend
npm install
npm run dev
The store will be available at http://localhost:5173
backend-nodenpm installnpm starthttps://kids-3d-store-api.onrender.com)frontend/.env with your Render backend URL:
VITE_API_URL=https://your-app-name.onrender.com
username.github.io/repo-name, also set:
BASE_PATH=/repo-name
cd frontend
npm run build
build folder to GitHub Pages:
build folder contents to a gh-pages branchQuick deploy to gh-pages branch:
cd frontend
npm run build
cd build
git init
git add .
git commit -m "Deploy"
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git push -f origin main:gh-pages
3DEEGusa/
โโโ backend-node/ # Node.js/Express API
โ โโโ index.js # Main server file
โ โโโ package.json # Dependencies
โ โโโ render.yaml # Render.com config
โ โโโ store.json # Data file (auto-created)
โ
โโโ frontend/ # SvelteKit application
โ โโโ src/
โ โ โโโ routes/ # Pages
โ โ โ โโโ +page.svelte # Home page
โ โ โ โโโ +layout.svelte # Main layout
โ โ โ โโโ shop/ # Product catalog
โ โ โ โโโ cart/ # Shopping cart & checkout
โ โ โ โโโ track/ # Order tracking
โ โ โ โโโ admin/ # Admin dashboard
โ โ โโโ lib/
โ โ โ โโโ api.ts # API client
โ โ โ โโโ config.ts # Configuration
โ โ โ โโโ stores.ts # Svelte stores
โ โ โโโ app.css # Global styles
โ โ โโโ app.html # HTML template
โ โโโ static/ # Static assets
โ โโโ package.json
โ
โโโ README.md
GET /api/products - Get all products (optional: ?category=Fantasy)GET /api/products/:id - Get single productPOST /api/products - Create productPUT /api/products/:id - Update productDELETE /api/products/:id - Delete productX-Session-ID header)GET /api/cart - Get cart itemsPOST /api/cart - Add to cartPUT /api/cart/:id - Update quantityDELETE /api/cart/:id - Remove itemDELETE /api/cart - Clear cartPOST /api/orders - Create order (from cart)GET /api/orders/:id - Get order detailsGET /api/orders/track/:code - Track by tracking codeGET /api/admin/orders - Get all ordersPUT /api/admin/orders/:id - Update order statusGET /api/admin/stats - Get dashboard statsThe backend automatically seeds 12 sample products when first started:
Made with โค๏ธ for young entrepreneurs! ๐