Skip to content

Repository files navigation

AN-IT Solution Website

Production-ready IT services and products website for Bangladesh, built with Node.js (Express), SQLite, and Vanilla JS. Designed for Windows VPS deployment behind IIS.

Tech Stack

  • Backend: Node.js + Express
  • Database: SQLite (Windows compatible)
  • Frontend: HTML5, CSS3, Vanilla JS
  • Reverse proxy/web edge: IIS (Windows Server 2019/2022)
  • Process manager: PM2

Core Features

  • Public pages: Home, Services, Products, About, Contact
  • Admin dashboard at /admin with role-based API access
  • User portal at /portal with order history and support ticket capability
  • JWT auth + refresh tokens in httpOnly cookie
  • CSRF protection, input validation, SQL parameterization, rate limiting
  • SEO: semantic HTML, OG tags, canonical URLs, JSON-LD, robots, sitemap

Quick Start (Local)

  1. Copy .env.example to .env and update secrets.
  2. Install dependencies: npm install
  3. Seed database: npm run seed
  4. Run app: npm run dev
  5. Open: http://localhost:3000

Default Admin Account

Windows VPS + IIS Deployment

  1. Install Node.js LTS, IIS, URL Rewrite, ARR, and PM2 globally: npm install -g pm2 pm2-windows-startup
  2. Enable ARR proxy in IIS (Application Request Routing Cache -> Server Proxy Settings -> Enable proxy).
  3. Place project under C:\inetpub\wwwroot\an-it-solution.
  4. Create .env from .env.example and set production secrets.
  5. Run deploy script: deploy.bat
  6. In IIS, create site and bind domain + ports 80/443.
  7. Add SSL using win-acme and bind cert to 443.
  8. Use included web.config in site root.
  9. Configure Application Pool: No Managed Code, Integrated pipeline.
  10. Allow firewall ports only: netsh advfirewall firewall add rule name="HTTP 80" dir=in action=allow protocol=TCP localport=80 netsh advfirewall firewall add rule name="HTTPS 443" dir=in action=allow protocol=TCP localport=443

PM2 Commands

  • Start: pm2 start ecosystem.config.js
  • Logs: pm2 logs an-it-solution
  • Save startup list: pm2 save
  • Setup startup: pm2-startup install

API Summary

  • Auth: /api/auth/register, /api/auth/login, /api/auth/refresh, /api/auth/logout
  • Public: /api/public/services, /api/public/products, /api/public/inquiries
  • Admin: /api/admin/dashboard + CRUD services/products
  • User: /api/user/orders, /api/user/support-tickets

Security Notes

  • Keep all secrets in .env only
  • Use strong JWT secrets and rotate periodically
  • Keep HTTPS redirect enabled in IIS
  • Restrict upload types and size
  • Review IIS Request Filtering for DDoS and payload limits

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages