• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
lee_roy

lee_roy

Test2

Public
Like
Test2
Home
Code
3
backend
1
shared
2
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/31/2025
Viewing readonly version of main branch: v5
View latest version
README.md

IoT Solutions Company Website

A professional, scalable eCommerce platform for IoT devices and solutions with comprehensive admin panel, secure payments, and lead management.

🚀 Features

Core Functionality

  • Product Storefront: Browse IoT devices, view specs, add to cart, secure checkout
  • IoT Solutions Portal: Showcase vertical solutions with lead capture
  • Admin Panel: Manage products, orders, customers, and analytics
  • Customer Accounts: Order history, invoices, shipping tracking
  • Secure Payments: Stripe integration for transactions

Technical Stack

  • Frontend: React 18 with TypeScript and Tailwind CSS
  • Backend: Hono (modern web framework) with TypeScript
  • Database: SQLite (Val Town hosted)
  • Authentication: JWT with role-based access
  • Storage: Val Town Blob storage for images/files
  • Email: Val Town email service
  • Payments: Stripe integration

📁 Project Structure

├── backend/
│   ├── database/
│   │   ├── migrations.ts    # Database schema setup
│   │   ├── queries.ts       # Database query functions
│   │   └── README.md
│   ├── routes/
│   │   ├── auth.ts         # Authentication routes
│   │   ├── products.ts     # Product management
│   │   ├── orders.ts       # Order processing
│   │   ├── solutions.ts    # IoT solutions
│   │   ├── admin.ts        # Admin panel APIs
│   │   └── static.ts       # Static file serving
│   ├── middleware/
│   │   ├── auth.ts         # JWT middleware
│   │   └── validation.ts   # Request validation
│   ├── services/
│   │   ├── stripe.ts       # Payment processing
│   │   ├── email.ts        # Email notifications
│   │   └── analytics.ts    # Analytics tracking
│   ├── index.ts            # Main entry point
│   └── README.md
├── frontend/
│   ├── components/
│   │   ├── common/         # Shared components
│   │   ├── product/        # Product-related components
│   │   ├── admin/          # Admin panel components
│   │   └── layout/         # Layout components
│   ├── pages/              # Page components
│   ├── hooks/              # Custom React hooks
│   ├── utils/              # Frontend utilities
│   ├── index.html          # Main HTML template
│   ├── index.tsx           # Frontend entry point
│   └── README.md
├── shared/
│   ├── types.ts            # Shared TypeScript types
│   ├── constants.ts        # Shared constants
│   └── utils.ts            # Shared utility functions
└── README.md

🗄️ Database Schema

Users

  • Authentication and profile management
  • Role-based access (customer, admin)

Products

  • IoT device catalog with specs and pricing
  • Categories and inventory tracking

Orders

  • Purchase transactions and order history
  • Payment and shipping status

Solutions

  • IoT solution offerings and descriptions
  • Lead capture and inquiry management

Analytics

  • Sales metrics and lead generation stats

🔐 Security Features

  • JWT-based authentication
  • Role-based access control
  • Input validation and sanitization
  • Secure payment processing with Stripe
  • Environment variable protection

🚀 Getting Started

  1. Set up environment variables in Val Town:

    • STRIPE_SECRET_KEY: Your Stripe secret key
    • JWT_SECRET: Secret for JWT token signing
    • ADMIN_EMAIL: Default admin email
  2. The backend will automatically create database tables on first run

  3. Access the application at your Val Town URL

📱 API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • POST /api/auth/refresh - Token refresh

Products

  • GET /api/products - List products
  • GET /api/products/:id - Get product details
  • POST /api/products - Create product (admin)
  • PUT /api/products/:id - Update product (admin)

Orders

  • POST /api/orders - Create order
  • GET /api/orders - Get user orders
  • GET /api/orders/:id - Get order details

Solutions

  • GET /api/solutions - List IoT solutions
  • POST /api/solutions/inquire - Submit solution inquiry

Admin

  • GET /api/admin/dashboard - Dashboard stats
  • GET /api/admin/orders - Manage orders
  • GET /api/admin/customers - Manage customers

🎨 UI/UX Features

  • Responsive design with Tailwind CSS
  • Modern component library
  • Professional IoT industry styling
  • Intuitive admin dashboard
  • Mobile-optimized checkout flow

📈 Analytics & Monitoring

  • Sales performance tracking
  • Lead generation metrics
  • Customer behavior analytics
  • Inventory monitoring
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.