Test2
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.
Viewing readonly version of main branch: v6View latest version
A professional, scalable eCommerce platform for IoT devices and solutions with comprehensive admin panel, secure payments, and lead management.
- 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
- 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
├── 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
- Authentication and profile management
- Role-based access (customer, admin)
- IoT device catalog with specs and pricing
- Categories and inventory tracking
- Purchase transactions and order history
- Payment and shipping status
- IoT solution offerings and descriptions
- Lead capture and inquiry management
- Sales metrics and lead generation stats
- JWT-based authentication
- Role-based access control
- Input validation and sanitization
- Secure payment processing with Stripe
- Environment variable protection
-
Set up environment variables in Val Town:
STRIPE_SECRET_KEY: Your Stripe secret keyJWT_SECRET: Secret for JWT token signingADMIN_EMAIL: Default admin email
-
The backend will automatically create database tables on first run
-
Access the application at your Val Town URL
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/refresh- Token refresh
GET /api/products- List productsGET /api/products/:id- Get product detailsPOST /api/products- Create product (admin)PUT /api/products/:id- Update product (admin)
POST /api/orders- Create orderGET /api/orders- Get user ordersGET /api/orders/:id- Get order details
GET /api/solutions- List IoT solutionsPOST /api/solutions/inquire- Submit solution inquiry
GET /api/admin/dashboard- Dashboard statsGET /api/admin/orders- Manage ordersGET /api/admin/customers- Manage customers
- Responsive design with Tailwind CSS
- Modern component library
- Professional IoT industry styling
- Intuitive admin dashboard
- Mobile-optimized checkout flow
- Sales performance tracking
- Lead generation metrics
- Customer behavior analytics
- Inventory monitoring