Skip to content

A full-stack e-commerce system built with PocketBase, Flutter, and Angular, designed for modern scalability and real-time performance.

License

Notifications You must be signed in to change notification settings

ZiadSafwat/PocketShop-Fullstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›๏ธ PocketShop Fullstack

Mobile Preview

A full-stack e-commerce system built with PocketBase, Flutter, and Angular, designed for modern scalability and real-time performance.

This project is still under active development, but it already demonstrates advanced integration between a custom backend, mobile, and web interfaces.

๐Ÿš€ Overview

PocketShop Fullstack is a multi-platform e-commerce solution featuring:

  • ๐Ÿ—„๏ธ PocketBase Backend โ€” for data storage, authentication, and APIs.
  • ๐Ÿ“ฑ Flutter Mobile App โ€” for Android, iOS, Windows, Linux, and macOS.
  • ๐ŸŒ Angular Web App โ€” for the browser-based shopping experience.

All components are connected seamlessly through PocketBase REST APIs.


๐Ÿง  System Architecture

Flutter App <----> PocketBase <----> Angular Web
(Mobile/Desktop) (Backend & Admin) (Frontend UI)

Each module communicates via PocketBaseโ€™s REST API, ensuring synchronized data between platforms.


๐Ÿ–ผ๏ธ Web Preview

Main Screen Main Screen
Main Screen with Category Main Screen
details Screen comments part
details Screen comments part
Edit product(admin only) Screen WishList Screen
Edit product(admin only) Screen WishList Screen
Cart Screen Search Screen
Cart Screen Search Screen

๐Ÿ–ผ๏ธ Mobile Preview

Mobile Preview
Mobile Preview

๐Ÿ–ผ๏ธ DashBoard Preview

DashBoard(Super admin) Screen DashBoard(Super admin) Screen
DashBoard(Super admin) DashBoard(Super admin)

๐Ÿ“‚ Project Structure

PocketShop-Fullstack/
โ”‚
โ”œโ”€โ”€ Backend-PB/ # PocketBase backend (data, hooks, storage)
โ”‚ โ”œโ”€โ”€ pb_data/ # Database and storage
โ”‚ โ”œโ”€โ”€ pb_hooks/ # Custom JavaScript logic for triggers and rules
โ”‚ โ”œโ”€โ”€ swagger/ # API documentation
โ”‚ โ”œโ”€โ”€ pocketbase # PocketBase server executable (Linux)
โ”‚ โ””โ”€โ”€ pocketbase.exe # PocketBase server executable (Windows)
โ”‚
โ”œโ”€โ”€ E-Commerce-Mobile-App/ # Flutter mobile app
โ”‚ โ”œโ”€โ”€ lib/ # Application code
โ”‚ โ”œโ”€โ”€ assets/ # Images and icons
โ”‚ โ”œโ”€โ”€ android/, ios/, web/ # Platform-specific code
โ”‚ โ””โ”€โ”€ pubspec.yaml # Flutter dependencies
โ”‚
โ””โ”€โ”€ Website-Angular/ # Angular web frontend
โ”œโ”€โ”€ src/app/ # Components, pages, and services
โ”œโ”€โ”€ angular.json # Angular config
โ””โ”€โ”€ package.json # Dependencies

โš™๏ธ PocketBase Schema

Collection Description
users Authentication system with roles (admin, user)
product Product listings with images, categories, colors, and sizes
categories Nested product categories with images
orders User orders with statuses and linked discounts
discount_codes Promo codes with limits and expiry dates
cart_item Shopping cart items with user-product relations
wish_list_items Wishlist management per user
reviews Product reviews with rating and comments
address User addresses (country, city, street, postal code)
banner Home banners with images and links
available_countries_cites JSON-based country and city availability
user_search Search history for personalization

๐Ÿ’พ PocketBase Admin Dashboard (demo)

  • Email: system@gmail.com
  • Password: 1234567890
    โš ๏ธ Change these in production for security.

๐Ÿ’พ App or Web (demo email)

  • Email: ziad@gmail.com
  • Password: 1234567890
    โš ๏ธ Change these in production for security.

๐Ÿงฉ Backend Hooks

Custom backend hooks are implemented in the pb_hooks folder to extend PocketBase functionality โ€” e.g., validation, custom logic, and automated triggers.


โš™๏ธ Features

  • ๐Ÿ” User authentication & role-based access
  • ๐Ÿ›’ Product management (CRUD)
  • ๐Ÿ’ณ Orders & checkout system
  • ๐Ÿ’ฌ Reviews and ratings
  • ๐Ÿ“ธ Image upload using PocketBase storage
  • ๐ŸŒ REST API + custom endpoints
  • ๐ŸŽจ Responsive UI with Flutter & Angular
  • ๐Ÿงฉ Modular architecture for easy scaling

๐Ÿง  Custom Routes (PocketBase)

PocketShop extends PocketBase with custom routes to handle business logic beyond CRUD.
These are defined in main.pb.js and loaded automatically at runtime.

Example Custom Routes

Method Endpoint Description
POST /api/cart/add Add a product to a userโ€™s cart
GET /api/cart/:userId Retrieve cart details for a specific user
POST /api/orders/checkout Create a new order and clear the cart
GET /api/products/search/:query Search for products by keyword
POST /api/auth/custom-login Custom user authentication logic

Example (main.pb.js):

router.post('/api/cart/add', (c) => {
    const userId = c.request.query.get('userId');
    const productId = c.request.query.get('productId');
    return c.json({ message: `Product ${productId} added to user ${userId}` });
});

๐Ÿ“ฑ Flutter App (Mobile & Desktop)

โœจ Key Features

  • Clean Arch with Bloc pattern for state management

  • Modern UI built

  • PocketBase API integration

  • Categories, product details, cart, and search

  • Authentication and profile management

  • Cross-platform support: Android, iOS, Web, Windows, Linux, macOS

โ–ถ๏ธ Run the app

cd E-Commerce-Mobile-App
flutter pub get
flutter run

๐ŸŒ Angular Website

โœจ Features

  • Clean, responsive, and modern interface

  • Admin product management (add/edit)

  • Authentication and protected routes

  • Dynamic product catalog with search and filtering

  • Integrated with PocketBase APIs

โ–ถ๏ธ Run the web app

cd Website-Angular
npm install
ng serve

๐Ÿ—„๏ธ Backend (PocketBase)

โ–ถ๏ธ Run the backend

cd Backend-PB
./pocketbase serve
  • PocketBase runs by default on
  • http://127.0.0.1:8090
  • Admin dashboard:
  • http://127.0.0.1:8090/_/

๐Ÿงฐ Tech Stack

Layer Technology
Backend PocketBase
Web Frontend Angular
Mobile App Flutter
Languages Dart, TypeScript, JavaScript
Architecture Clean Architecture (Flutter)
State Management Bloc (Flutter)

๐Ÿ”ฎ Future Improvements

  • ๐Ÿงพ Payment integration (Stripe/Paymob)

  • ๐Ÿง  AI-powered product recommendations

  • ๐Ÿ“ฆ Advanced admin dashboard for analytics

  • ๐Ÿช„ Push notifications for offers

๐Ÿงฑ PocketShop Fullstack is currently in development โ€” stay tuned for updates!

๐Ÿง‘โ€๐Ÿ’ป Author

Ziad El-Araby

Full-Stack Dotnet Developer | Flutter & Angular Enthusiast

๐Ÿ“ง Email: Ziadsafwataraby@gmail.com
๐Ÿ”— Website: MyWebsite
๐Ÿ”— GitHub: @ZiadSafwat

๐Ÿ“œ License

This project is licensed under the MIT License.

โญ Support the Project

If you like PocketShop Fullstack, please consider giving it a star โญ on GitHub!

Or support development ๐Ÿ‘‰ โ˜• Buy Me a Coffee

About

A full-stack e-commerce system built with PocketBase, Flutter, and Angular, designed for modern scalability and real-time performance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published