A modern web application for a laboratory glass manufacturing business, built with Next.js, React, and Node.js. Hosted on Vercel, with Cloudflare for DNS routing.
Live site: https://www.thiasil.com/
- Product catalog with categories, images, and details
- Admin panel for inventory, pricing, and coupon management
- Product backup and restore system (using Redis)
- PDF catalog generation
- Contact form and company info
- Responsive, modern UI with glassmorphism and neon effects
- Authentication for admin actions
- Frontend: Next.js (App Router), React, Tailwind CSS
- Backend: Node.js (API routes in Next.js)
- Database: JSON files for products/coupons, Redis for backups
- Deployment: Vercel
- Other: Docker (for local Redis), Cloudflare (DNS)
git clone https://github.com/sharanggupta/thiasil.git
cd thiasil
npm install
node scripts/generate-admin-hash.js YOUR_SECURE_PASSWORD
ADMIN_USERNAME=admin
ADMIN_PASSWORD_HASH=<hash_from_above_command>
REDIS_URL=redis://localhost:6379
📚 For detailed security setup instructions, see SECURITY.md
docker-compose up -d
This will start a Redis container named thiasil-redis
on port 6379.
npm run dev
Visit http://localhost:3000
- Visit
/admin
and log in with the credentials from.env.local
. - Manage products, categories, inventory, and prices.
- Create, delete, and manage coupons.
- Backup and restore product data (uses Redis).
- Reset products to default using the backup management tools.
- Browse products by category on the main site.
- View product details, images, and features.
- Download the PDF catalog.
- All product/category changes trigger a backup in Redis.
- Restore or reset data from the admin panel.
├── src/
│ ├── app/ # Next.js app directory (pages, API routes, components)
│ ├── data/ # JSON data files (products, coupons, defaults)
│ ├── lib/ # Utility modules and custom React hooks
│ └── ...
├── public/ # Static assets (images, PDF, etc.)
├── docker-compose.yml # Docker config for Redis
├── README.md
└── ...
ADMIN_USERNAME
- Username for admin loginADMIN_PASSWORD_HASH
- Secure bcrypt hash of admin password (generate with script)REDIS_URL
- Redis connection string (default:redis://localhost:6379
)
ADMIN_PASSWORD
(plain text). Always use ADMIN_PASSWORD_HASH
.
- Deployed on Vercel (see
next.config.mjs
for config) - Uses Vercel KV in production if available, otherwise local Redis
- Cloudflare is used for DNS
- In Vercel Dashboard → Project Settings → Environment Variables
- Add:
ADMIN_USERNAME
:admin
ADMIN_PASSWORD_HASH
: Use the hash generated by the script
- Deploy your application
📚 See SECURITY.md for complete deployment security guide.
PRs and issues are welcome! Please open an issue for bugs or feature requests.
MIT