Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

88 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Xontrix Badge

πŸ›’ Xontrix

Shop. Manage. Analyze Smarter.

An integrated Electronics E-Commerce, Inventory & AI Business Intelligence platform featuring a component catalog, multi-channel checkout, sales analytics dashboard, and AI-powered advisor agents.

React Vite TypeScript Tailwind CSS shadcn/ui Recharts PHP MySQL Node.js Cordova pnpm

Apache MySQL DB Android APK GitHub

Introduction β€’ Local Setup & Credentials β€’ Screenshots β€’ Features β€’ Architecture β€’ Design Patterns β€’ Tech Stack β€’ Services & Environment Configuration β€’ Getting Started β€’ API Reference β€’ Database Schema β€’ Project Structure β€’ Product Categories β€’ Roadmap β€’ Contributing β€’ License


πŸ“– Introduction

Xontrix is a full-stack, monorepo-based electronic components e-commerce platform and business intelligence suite. Built to provide hobbyists and professional builders with an easy way to purchase microcontrollers, sensors, motors, and shields, Xontrix also delivers a powerful web portal for administrators to run sales analytics, track stock levels, and coordinate delivery calendars.

The platform links a clean React web frontend and an Apache Cordova mobile client with a PHP/MySQL API server and a dedicated Node.js/Express authentication server. By integrating inventory capping checks, role-based access, a full user account dashboard, and conversational AI advisor widgets (an Admin-side AI Strategic Advisor and a User-side AI Electronics Consultant), Xontrix is a comprehensive showcase of modern e-commerce engineering.

πŸ’‘ Designed for local & mobile deploy, Xontrix utilizes XAMPP (Apache + MySQL) to keep backend setups simple and lightweight. This makes it easy to run local demonstrations, debug database states, and compile native Android packages directly against the local web API.


🌐 Local Setup & Credentials

Local Services

Service Address / Port Technology Location
🌐 Web Portal http://localhost:5173 React 18 + Vite 6 + Tailwind 4 apps/web/
πŸ” Auth Server http://localhost:3001 Node.js + Express + JWT apps/auth-server/
βš™οΈ API Server http://localhost/xontrix-backend/api PHP REST-like API apps/backend/xontrix-backend/
πŸ’Ύ Seed Installer http://localhost/xontrix-backend/api/install.php Schema seed engine apps/backend/xontrix-backend/api/install.php
πŸ“¦ Mobile App Target Android APK Apache Cordova CLI wrapper apps/mobile/cordova-mobile/

Default Seeded Credentials

The database installer includes seeded user records to speed up development. Running the seeder initializes the default admin user listed below. You can log in using these credentials to access the analytics and management dashboards:

Role Email Password Admin Access
Platform Administrator admin@xontrix.local admin123 βœ… Full access to sales analytics, orders, products, inventory, user lists, and AI reports

Note: To seed or reset the database back to default records (including products, orders, user accounts, and feedback comments), run the install.php file in your browser once. For production security, restrict access or delete this file in deployment environments.


πŸ“Έ Screenshots

πŸ” Navigation Header

Xontrix Navigation Header

Persistent top navigation bar with logo, search field, category links, cart badge, and user account menu.

🏠 Homepage β€” Hero Section

Xontrix Homepage Hero

Modern storefront hero featuring a full-width promo banner, headline copy, and a primary call-to-action to browse the catalog.

🏠 Homepage β€” Categories Section

Xontrix Homepage Categories

Visual category grid showcasing all six electronics categories with icon cards and quick-navigate links.

🏠 Homepage β€” Universities & Featured Sections

Xontrix Homepage Sections

Mid-page highlights including university partnerships, featured component picks, and promotional deal rows.

πŸ‘£ Homepage Footer

Xontrix Homepage Footer

Clean, descriptive footer layout listing store links, customer attributions, and design credits.

πŸ›οΈ Products Page β€” Catalog Listing

Xontrix Products Page

Product catalog screen featuring category sidebar filters, search bar, item ratings, stock status, and add-to-cart actions.

πŸ›οΈ Products Page β€” Scrolled View

Xontrix Products Scroll

Lower catalog section showing additional products with consistent card layout and badge indicators.

πŸ“¦ Product Detail β€” Top View

Xontrix Product Detail

Individual product page with high-res image, pricing, stock indicator, specification table, and add-to-cart controls.

πŸ“¦ Product Detail β€” Scrolled View

Xontrix Product Detail Scroll

Lower product detail area showing the full specifications breakdown, ratings summary, and customer reviews.

πŸ›’ Cart β€” Empty State

Xontrix Empty Cart

Empty cart state with a friendly placeholder illustration and a call-to-action to continue browsing the catalog.

ℹ️ About Page β€” Top View

Xontrix About Page

Frosted-glass UI introducing the store's mission, quality standards, and core team overview.

ℹ️ About Page β€” Scrolled View

Xontrix About Scroll

Lower about section featuring technical partner attributions, community milestones, and social proof details.

πŸ“¬ Contact Page

Xontrix Contact Page

Clean contact page with an interactive query form, customer support links, and office location details.

πŸ” Login Page

Xontrix Login Page

Authentication page supporting standard email/password login and Google sign-in via Firebase OAuth flow.

πŸ€– Chatbot β€” Opened

Xontrix Chatbot Open

AI Electronics Consultant floating widget opened, ready to assist users with product compatibility questions.

πŸ€– Chatbot β€” Active Conversation

Xontrix Chatbot Conversation

Live chatbot session demonstrating context-aware recommendations for selecting compatible microcontrollers and sensors.

πŸ’³ Checkout Page

Xontrix Checkout Page

Checkout layout showing order summary, shipping calculation, and multi-channel payment method options (GCash, Maya, COD, Card).

🚫 404 Not Found Page

Xontrix 404 Page

Styled not-found page with navigation shortcuts to guide users back to the catalog or homepage.


✨ Features

Feature Description
πŸ›’ Product Catalog & Filters Dynamic electronics catalog with category sorting, search, item ratings, reviews, stock labels, and new item flags.
πŸ’³ Flexible Checkout Flow Step-by-step transaction form supporting GCash, Maya, Cash on Delivery (COD), and credit card configurations.
πŸ“¦ Real-Time Inventory Sync Automatic database checks that block purchases when quantities exceed stock, updating stock values on successful orders.
πŸ“Š Admin Sales Analytics Business Intelligence dashboard with charts, MoM growth metrics, targets, pending/shipped order states, and low-stock warnings.
πŸ€– AI Strategic Advisor Admin-side chatbot that scans sales metrics and historical feedback to generate financial advice.
πŸ’¬ AI Electronics Consultant Customer-side floating chat widget that guides users on picking compatible microcontrollers and sensors.
πŸ“… Delivery Order Calendar Dynamic calendar displaying shipping statuses, order delivery deadlines, and priority warnings.
πŸ… Customer Loyalty Tiers Automatically places customers into Bronze, Silver, Gold, or Platinum tiers based on total spend and order counts.
πŸ‘€ User Account Dashboard Full profile management with order history, saved addresses, wishlist, notifications, and security settings.
πŸ” Multi-Auth Protocol Session-based login, JWT authentication via Node.js/Express auth server, and Google OAuth via Firebase Auth SDK.
πŸ“± Cordova Mobile Wrapper Cordova project setup targeting Android platforms, allowing the web portal to be compiled into a native APK.
πŸ—οΈ PNPM Monorepo Layout Organized workspaces grouping the web app, auth server, PHP API backend, documentation, and mobile build wrappers.

πŸ—οΈ Architecture

System Architecture Diagram

graph TB
    subgraph Client ["πŸ–₯️ Client Layer"]
        WEB["React 18 & TypeScript<br/>Web Portal<br/>(Vite 6)"]
        MOBILE["Apache Cordova<br/>Mobile App<br/>(Android APK Target)"]
    end

    subgraph AuthSrv ["πŸ” Auth Server (Node.js / Express)"]
        JWT["JWT Token Issuer<br/>bcrypt Password Hashing"]
        GOOGLE["Google Token Verifier<br/>(google-auth-library)"]
    end

    subgraph API ["βš™οΈ API Layer (Apache / XAMPP)"]
        BOOTSTRAP["bootstrap.php<br/>Global Init & Cors"]
        CONFIG["config.php<br/>MySQL DB Config"]
        PRODUCTS["products.php<br/>Product Catalog CRUD"]
        ORDERS["orders.php<br/>Order Placement & Sync"]
        USERS["users.php<br/>Session Auth & Roles"]
        SALES["sales.php<br/>Sales & Analytics API"]
        UPLOAD["upload.php<br/>Image Uploader"]
    end

    subgraph Data ["πŸ’Ύ Data Layer (Local Server)"]
        MYSQL["MySQL Database<br/>(Local Relational tables)"]
    end

    subgraph Services ["🌐 External Services"]
        FIREBASE["Firebase Auth SDK<br/>Google Login Portal"]
    end

    subgraph UserAI ["πŸ’¬ Client-side User AI"]
        CONSULTANT["AI Floating Widget<br/>Electronics Consultant"]
    end

    subgraph AdminAI ["πŸ€– Admin-side AI"]
        ADVISOR["AI Strategic Advisor<br/>Chatbot Interface"]
    end

    WEB -->|"HTTP Requests"| API
    WEB -->|"Auth Requests"| AuthSrv
    MOBILE -->|"HTTP Requests"| API
    WEB -->|"OAuth Tokens"| FIREBASE
    AuthSrv -->|"SQL Queries"| MYSQL
    API -->|"SQL Queries"| MYSQL
    WEB -->|"Floating Chat"| CONSULTANT
    WEB -->|"Admin Chat"| ADVISOR
    ADVISOR -->|"Scans Context"| API

    style Client fill:#1e1b4b,stroke:#818cf8,color:#f8fafc
    style AuthSrv fill:#1e293b,stroke:#22d3ee,color:#f8fafc
    style API fill:#111827,stroke:#10b981,color:#f8fafc
    style Data fill:#1e1b4b,stroke:#eab308,color:#f8fafc
    style Services fill:#111827,stroke:#f97316,color:#f8fafc
    style UserAI fill:#1e293b,stroke:#06b6d4,color:#f8fafc
    style AdminAI fill:#1e293b,stroke:#a855f7,color:#f8fafc
Loading

Data Flow

User / Admin Interaction
  β”‚
  β”œβ”€β”€β”€ [Products List / Catalog] ─→ productsApi.list() ──→ products.php ──→ MySQL (SELECT)
  β”‚
  β”œβ”€β”€β”€ [Checkout Transaction] ────→ ordersApi.create() ──→ orders.php
  β”‚                                                          β”œβ”€β”€β†’ Check Stock Availability
  β”‚                                                          β”œβ”€β”€β†’ Deduct MySQL Inventory (UPDATE)
  β”‚                                                          β”œβ”€β”€β†’ Insert Order & Items (INSERT)
  β”‚                                                          └──→ Return ApiOrder JSON
  β”‚
  β”œβ”€β”€β”€ [Login / Register] ────────→ Auth Server (Express) ─→ JWT Token
  β”‚                                                          β”œβ”€β”€β†’ bcrypt password hash verify
  β”‚                                                          β”œβ”€β”€β†’ Google token validation
  β”‚                                                          └──→ Return signed JWT cookie
  β”‚
  β”œβ”€β”€β”€ [AI Strategic Advice] ─────→ Admin Dashboard ─────→ salesApi.summary() ──→ sales.php
  β”‚                                                          β”œβ”€β”€β†’ Compute financial KPIs
  β”‚                                                          β”œβ”€β”€β†’ Retrieve daily/weekly/monthly charts
  β”‚                                                          └──→ Strategic advice prompt context
  β”‚
  └─── [Google Authentication] ───→ Firebase Auth SDK ───→ Auth Server / users.php
                                                             β”œβ”€β”€β†’ Create / Login User Record
                                                             └──→ Return Session Cookie

πŸ“ Design Patterns

Pattern Usage Details
πŸ”€ Monorepo Structure Workspace Layout Manages multiple applications (frontend, auth server, backend, mobile) within a single codebase using pnpm-workspace.yaml.
πŸ“‹ Model-View-Controller (MVC) Backend Routing PHP controllers act as routers (Controllers), database queries represent data shapes (Models), and JSON outputs serve as views (Views).
🧱 Type-Safe Contracts API Interface Client TypeScript interfaces in the web app mirror MySQL schema fields exactly, creating an end-to-end data contract.
πŸ” JWT + Session Auth User Authentication Combines a dedicated Node.js JWT auth server with PHP sessions, plus Firebase tokens for Google OAuth client flows.
πŸ›‘οΈ Guard / Policy Pattern Admin Route Protection Middleware checks roles (e.g., admin role check) both in React Router (frontend) and on the PHP backend APIs (backend).
🎣 State Synchronization React Hooks & Context Syncs shopping cart state, session user profiles, and catalog cache across pages using React Context providers.
βš™οΈ Inventory Safety Optimistic Locking Verifies quantity caps during cart updates and re-validates stock levels at the moment of checkout transaction.
πŸ€– Conversational Interface Agent UI Chat Widgets Integrates floating conversational UI components leveraging context-aware responses to guide users and advise admins.

πŸ›  Tech Stack

🎨 Frontend

Technology Purpose
React Component-based UI rendering, local state management, and virtual DOM diffing.
TypeScript End-to-end type safety, auto-completion of API models, and compile-time error checks.
Vite Bundle compiler, development server, dynamic hot module replacement, and environment configurations.
Tailwind CSS Responsive utilities, layouts, gradients, and custom components styling.
shadcn/ui Modular accessible building components built on Radix UI primitives.
Recharts Custom interactive area and line charts for daily/weekly/monthly revenue tracking.

βš™οΈ Backend

Technology Purpose
PHP Server-side script request routing, JSON generation, session management, and stock deduction.
MySQL Relational database engine storing products, user details, order lists, analytics, and feedback.
Node.js Dedicated auth server handling JWT issuance, bcrypt password hashing, and Google token verification.
Firebase Google sign-in provider SDK, handling client token flows for account login matching.

🧰 Mobile & Tooling

Technology Purpose
Cordova Hybrid wrapper compilation to bundle Vite production assets into a native Android APK target.
pnpm Workspace package manager handling dependencies, workspace scripts, and monorepo orchestration.

☁️ Services & Environment Configuration

Deployment Workflow

Workspace (Local Edit)
   β”‚
   β”œβ”€β”€β”€ Web Assets Build ──→ pnpm build ──→ dist/ ──→ Deploy to Static Apache Root
   β”‚
   β”œβ”€β”€β”€ Auth Server ───────→ node server.js (or nodemon) ──→ localhost:3001
   β”‚
   β”œβ”€β”€β”€ Mobile APK Build ──→ cordova build android ──→ platforms/android/app/.../app-debug.apk
   β”‚
   └─── Backend Setup ─────→ Copy apps/backend/xontrix-backend to htdocs/
                                 └─── Trigger db seeder install.php

Service Roles

# Service Role Server / Local Description
1 Apache HTTP Server Web API Host Local (XAMPP) Hosts the PHP controllers and assets, handling API routing calls.
2 MySQL Database Relational Storage Local (XAMPP) Stores core entities: products, inventory, users, sales metrics, and logs.
3 Node.js Auth Server JWT Authentication Local (Express) Handles password hashing, JWT token issuance, and Google token validation.
4 Firebase Console Google Identity Provider Cloud Service Authenticates user clients and returns credentials for Google login sync.
5 Cordova Android SDK APK Compiler Local CLI Wraps frontend files into native Android app package configurations.

Environment Configuration Reference

To let the frontend web portal communicate with the backend PHP endpoints, auth server, and Google Auth, create a .env file under apps/web/ containing:

# ── API Connection (XAMPP Local Server) ──
VITE_API_URL=http://localhost/xontrix-backend/api

# ── Auth Server Connection ──
VITE_AUTH_URL=http://localhost:3001

# ── Google Authentication (Firebase Console Setup) ──
VITE_FIREBASE_API_KEY=your_firebase_api_key_here
VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
VITE_FIREBASE_APP_ID=your_firebase_app_id

πŸš€ Getting Started

πŸ“‹ Prerequisites

Ensure you have the following software installed locally:

Tool Version Link
🟒 Node.js β‰₯ 18.0 nodejs.org
πŸ“¦ pnpm β‰₯ 9.0 pnpm.io
πŸŽ›οΈ XAMPP / WampServer Latest (PHP 8+, MySQL) apachefriends.org
πŸ“± Android Studio / SDK Command Line Tools & Gradle developer.android.com
β˜• Java JDK 17 oracle.com

⚑ Local Project Setup

1. Clone the repository

git clone https://github.com/TechyElle/e-commerce_website.git
cd e-commerce_website

2. Install dependencies

pnpm install

3. Configure the PHP / MySQL Backend (XAMPP)

  • Copy the folder apps/backend/xontrix-backend into your XAMPP htdocs directory:
    C:\xampp\htdocs\xontrix-backend
    
  • Open XAMPP Control Panel and start Apache and MySQL.

4. Generate & Seed the Database

  • Open your browser and navigate once to:
    http://localhost/xontrix-backend/api/install.php
    
    This creates the tables defined in schema.sql and inserts mock electronics products, orders, and users.

5. Start the Auth Server

cd apps/auth-server
npm run dev

The auth server will be available at http://localhost:3001.

6. Start the Frontend Web App

  • Ensure you have configured your .env file under apps/web/.
  • From the monorepo root, launch the development server:
    pnpm dev
  • Open http://localhost:5173 in your browser.

πŸ“± Building the Mobile App (Android)

1. Navigate to the Cordova workspace

cd apps/mobile/cordova-mobile/

2. Add the Android platform

cordova platform add android

3. Compile target APK

cordova build android
  • The output APK will be generated at: platforms/android/app/build/outputs/apk/debug/app-debug.apk

πŸ“‘ API Reference

PHP API β€” http://localhost/xontrix-backend/api

Endpoint Method Description
/products.php GET List all products with optional category/search filters
/products.php POST / PUT / DELETE Admin product CRUD operations
/orders.php GET Retrieve orders list
/orders.php POST Place a new order with inventory deduction
/users.php GET / POST User session management and login
/sales.php GET Sales summary, revenue charts, and analytics KPIs
/upload.php POST Admin product image file upload

Auth Server β€” http://localhost:3001

Endpoint Method Description
/auth/register POST Register a new user with bcrypt password hashing
/auth/login POST Login and receive a signed JWT token
/auth/google POST Verify Google token and return a JWT

πŸ—„οΈ Database Schema

The relational database (hosted locally on MySQL) is structured as follows:

erDiagram
    users {
        int id PK
        varchar name
        varchar email UK
        varchar password
        varchar role
        timestamp created_at
    }

    products {
        varchar id PK
        varchar name
        decimal price
        varchar category
        text description
        varchar image
        int stock
        float rating
        int reviews
        boolean is_new
        json specs
        timestamp created_at
        timestamp updated_at
    }

    orders {
        varchar id PK
        varchar customer_name
        varchar customer_email
        varchar payment_method
        varchar status
        decimal subtotal
        decimal shipping
        decimal total
        timestamp created_at
        timestamp updated_at
    }

    order_items {
        int id PK
        varchar order_id FK
        varchar product_id FK
        varchar name
        decimal price
        int quantity
        varchar image
    }

    feedback {
        int id PK
        varchar customer_name
        varchar customer_email
        int rating
        text comment
        timestamp created_at
    }

    users ||--o{ orders : "places"
    orders ||--|{ order_items : "contains"
    products ||--o{ order_items : "ordered_in"
Loading

πŸ“ Project Structure

.
β”œβ”€β”€ πŸ“‚ apps/
β”‚   β”œβ”€β”€ 🌐 web/                    # React 18 + Vite 6 + Tailwind 4 Frontend (β†’ Local Host)
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ app/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/ # UI Components (shadcn/ui + custom widgets)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ context/    # React Contexts (AuthContext, CartContext, StoreContext)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ hooks/      # Custom React hooks (useScrollReveal)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ lib/        # API Client wrapper (api.ts)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/      # Route pages:
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Home.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Products.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ ProductDetail.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Cart.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Checkout.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ About.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Contact.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Login.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Admin.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ Dashboard.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ UserProfile.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ UserOrders.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ UserWishlist.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ UserAddresses.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ UserNotifications.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ UserSecurity.tsx
β”‚   β”‚   β”‚   β”‚   β”‚   └── πŸ“„ NotFound.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“„ App.tsx     # Root app router provider
β”‚   β”‚   β”‚   β”‚   └── πŸ“„ routes.tsx  # Dynamic router configuration
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ imports/        # Image assets, logo, QR code
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ styles/         # Globals.css containing Tailwind utility theme config
β”‚   β”‚   β”‚   └── πŸ“„ main.tsx        # React bootstrap entry point
β”‚   β”‚   β”œβ”€β”€ πŸ“„ vite.config.ts      # Vite 6 compiler and proxy settings
β”‚   β”‚   └── πŸ“„ package.json
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ” auth-server/            # Node.js + Express JWT Auth Server (β†’ localhost:3001)
β”‚   β”‚   β”œβ”€β”€ πŸ“„ server.js           # Express routes: /auth/register, /auth/login, /auth/google
β”‚   β”‚   β”œβ”€β”€ πŸ“„ db.js               # MySQL2 connection pool
β”‚   β”‚   └── πŸ“„ package.json
β”‚   β”‚
β”‚   β”œβ”€β”€ βš™οΈ backend/
β”‚   β”‚   └── πŸ“‚ xontrix-backend/    # PHP / MySQL API Server Application (β†’ Apache)
β”‚   β”‚       β”œβ”€β”€ πŸ“‚ api/
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ bootstrap.php  # Global CORS and header setups
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ config.php     # MySQL database credentials & PDO wrapper
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ install.php    # Automatic table generation & dataset seeder
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ orders.php     # Order CRUD and inventory deduct actions
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ products.php   # Product catalog manager (CRUD API)
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ sales.php      # Sales analytics summary & dashboard events API
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ schema.sql     # Database schema structure dump
β”‚   β”‚       β”‚   β”œβ”€β”€ πŸ“„ upload.php     # File upload handlers for admin products
β”‚   β”‚       β”‚   └── πŸ“„ users.php      # Session registration, login, and roles
β”‚   β”‚       └── πŸ“„ README.md          # Backend configuration instructions
β”‚   β”‚
β”‚   └── πŸ“± mobile/
β”‚       └── πŸ“‚ cordova-mobile/    # Apache Cordova Mobile wrapper configuration (β†’ APK)
β”‚           β”œβ”€β”€ πŸ“‚ config.xml      # Cordova app configs (name, bundle id, permissions)
β”‚           └── πŸ“‚ www/            # Compiled static files folder for Cordova builds
β”‚
β”œβ”€β”€ πŸ“‚ docs/
β”‚   β”œβ”€β”€ πŸ“‚ planning/               # Architecture designs, planning checklists
β”‚   β”œβ”€β”€ πŸ“‚ screenshots/            # 18 showcase screenshots of all pages
β”‚   β”œβ”€β”€ πŸ“„ Attributions.md         # Framework and asset attributions
β”‚   β”œβ”€β”€ πŸ“„ PRODUCTS.pdf            # PDF documentation on electronic products
β”‚   β”œβ”€β”€ πŸ“„ README.md               # Standard client setup guide
β”‚   β”œβ”€β”€ πŸ“„ task.md                 # AI sales feature implementation status
β”‚   └── πŸ“„ TODO.md                 # Project QA checklists
β”‚
β”œβ”€β”€ πŸ“„ pnpm-workspace.yaml         # PNPM workspace configurations
β”œβ”€β”€ πŸ“„ pnpm-lock.yaml              # Lockfile
└── πŸ“„ README.md                   # You are here!

πŸ—‚οΈ Product Categories

Xontrix organizes its electronic components catalog into 6 core product categories:

Icon Category Name Description & Key Examples
🧠 Microcontrollers Core processor units: Arduino Uno, ESP8266 NodeMCU, ESP32, Arduino Nano
πŸ“‘ Sensors Interaction modules: DHT11 Temp, MQ-2 Smoke, Ultrasonic HC-SR04, Soil Moisture
βš™οΈ Actuators & Motors Movement drivers: Stepper Motor, Servo Motor SG90, DC Gearbox Robot Motor
πŸ›‘οΈ Shields & Modules Expandable shield boards: Motor Driver L298N, RFID RC522, ESP8266 Expansion
πŸ”Œ Accessories & Cables Prototype tools: Breadboard, Jumper Wires, 5V Regulator LM7805, Logic ICs
πŸ”‹ Power & Switches Energy controllers: Rocker Switch 2-pin, 9V Battery Snap, Toggle buttons

πŸ—ΊοΈ Roadmap

  • Scaffolding monorepo layouts using PNPM workspaces
  • Implementing React storefront components catalog
  • Implementing PHP MySQL backend endpoints
  • Adding Node.js/Express JWT authentication server
  • Coding dynamic cart management cap-checked by available inventory
  • Writing auto-deduct SQL orders transaction triggers
  • Adding Firebase Google Auth SDK route configurations
  • Adding Admin sales analytics charts and calendar views
  • Designing strategic AI Advisor and user AI Consultant chatbot views
  • Building full user account dashboard (profile, orders, wishlist, addresses, notifications, security)
  • Building Cordova hybrid project configs to compile Android APK targets
  • Integrating GCash and Maya real payment gateway merchant APIs
  • Implementing real-time push notifications for delivery deadlines
  • Setting up automated daily database backup scripts
  • Adding multi-vendor admin access controls to /admin routes

🀝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the repository
  2. Create your feature branch
    git checkout -b feat/amazing-feature
  3. Commit your changes
    git commit -m "feat: add amazing feature"
  4. Push to the branch
    git push origin feat/amazing-feature
  5. Open a Pull Request

πŸ“ Commit Convention

This project follows Conventional Commits:

Prefix Description
feat: New feature
fix: Bug fix
docs: Documentation changes
style: Code style (formatting, no logic change)
refactor: Code refactoring
test: Adding or updating tests
chore: Maintenance tasks

πŸ‘₯ Team

Ghani Regina Gold San Luis
Quality Assurance Engineer
Cielle Mae PeΓ±amora
Full-Stack Engineer
Jayson Cris Mamaril
Mobile Engineer

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

MIT License

Copyright (c) 2026 TechyElle | Ghani Regina Gold

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ™ Acknowledgements

  • React β€” The library for web user interfaces
  • Vite β€” Next-generation frontend tooling
  • Tailwind CSS β€” Utility-first CSS styling
  • PHP β€” Fast, general-purpose scripting language
  • MySQL β€” Relational database system
  • Express β€” Fast, minimalist web framework for Node.js
  • Apache Cordova β€” Mobile application development framework
  • Firebase Auth β€” Google identity provider toolkit
  • Recharts β€” Redefined chart library for React applications
  • Lucide React β€” Clean community-designed SVG icons
  • shadcn/ui β€” Premium accessible React component primitives

Built with πŸ’‘ for efficient electronics development

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages