A premium interior design and home furnishing website built with Node.js, Express, EJS, TailwindCSS, and MongoDB.
- Home Page: Hero section, featured projects, services overview, call-to-action
- Services Page: Detailed service listings with descriptions and features
- Projects Page: Filterable gallery with category filtering
- Project Details: Full project showcase with image carousel, before/after, and quote request
- About Page: Brand story, mission, values, and process timeline
- Contact Page: Contact form with email/phone/message fields
- Authentication: Session-based login with secure password hashing
- Project Management: Full CRUD operations with image uploads via Cloudinary
- Service Management: Create, edit, delete services
- Testimonials Management: Manage client testimonials and ratings
- Message Management: View and manage contact form submissions
- Dashboard Stats: Overview of all content
- Backend: Node.js, Express.js
- Database: MongoDB with Mongoose
- Templating: EJS
- Styling: TailwindCSS with JIT mode
- Image Hosting: Cloudinary
- Authentication: Express Session + bcrypt
- File Upload: Multer
- Node.js v14+
- MongoDB (local or cloud)
- Cloudinary account (for image uploads)
- Clone/Extract the project
cd Dslabguy- Install dependencies
npm install- Configure environment variables (create
.envfile)
MONGODB_URI=mongodb://localhost:27017/dslabguy
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
SESSION_SECRET=your_session_secret
PORT=3000
NODE_ENV=development
ADMIN_USERNAME=admin
ADMIN_PASSWORD=changeMe123
- Build TailwindCSS
npm run build-css- Start the development server
npm run devVisit http://localhost:3000 to access the website.
- Username:
admin(from.envADMIN_USERNAME) - Password:
changeMe123(from.envADMIN_PASSWORD)
/project-root
├── app.js # Main application file
├── package.json # Dependencies
├── tailwind.config.js # TailwindCSS configuration
├── postcss.config.js # PostCSS configuration
├── config/ # Configuration files
│ ├── database.js # MongoDB connection
│ ├── cloudinary.js # Cloudinary setup
│ └── session.js # Session configuration
├── models/ # Mongoose schemas
│ ├── Project.js
│ ├── Service.js
│ ├── Testimonial.js
│ ├── Message.js
│ └── AdminUser.js
├── controllers/ # Business logic
│ ├── projectController.js
│ ├── serviceController.js
│ ├── testimonialController.js
│ ├── contactController.js
│ └── authController.js
├── routes/ # Route definitions
│ ├── publicRoutes.js
│ ├── adminRoutes.js
│ └── authRoutes.js
├── views/
│ ├── partials/ # Header, footer, navbar
│ ├── public/ # Public-facing pages
│ └── admin/ # Admin dashboard pages
├── public/
│ ├── css/ # TailwindCSS output
│ ├── js/ # Frontend scripts
│ └── images/ # Static images
# Start production server
npm start
# Start development server with auto-reload
npm run dev
# Build CSS from TailwindCSS
npm run build-css
# Watch for CSS changes
npm run watch-cssGET /api/projects- Get all projectsGET /api/projects/featured- Get featured projectsGET /api/projects/:id- Get single projectGET /api/services- Get all servicesPOST /api/contact- Submit contact form
GET /admin/dashboard- Admin dashboardGET /admin/projects- View all projectsPOST /admin/projects- Create projectPOST /admin/projects/:id- Update projectGET /admin/projects/delete/:id- Delete project- Similar endpoints for services, testimonials, messages
- Dark luxurious theme with gold accents
- Custom typography (Playfair Display, General Sans)
- Smooth animations and transitions
- Fully responsive design
- IntersectionObserver-based reveal animations
- Background:
#0e0e0e(deep black) - Foreground:
#e7e4dd(warm stone) - Accent:
#c8a96a(brass gold) - Muted:
#9c8f7a(muted stone)
- Fade-up on scroll
- Stagger reveals
- Smooth hover effects
- Image zoom on hover
- Button transitions
Edit tailwind.config.js and :root CSS variables:
:root {
--bg: #0e0e0e;
--fg: #e7e4dd;
--accent: #c8a96a;
--muted: #9c8f7a;
}- Go to Admin Dashboard
- Click "Services"
- Fill in title, description, icon, and features
- Submit
- Go to Admin Dashboard
- Click "Add Project"
- Upload images (up to 10)
- Fill in details and submit
- Mark as featured if desired
- Go to Admin Dashboard
- Click "Testimonials"
- Add client testimonials with ratings
- Lazy loading images
- Debounced scroll events
- Optimized animations with CSS transforms
- Minified TailwindCSS output
- Session store in MongoDB
- Cloudinary image optimization
- Password hashing with bcrypt
- Session-based authentication
- Environment variable protection
- CSRF protection (implement in production)
- Input validation
- Install production dependencies:
npm install --production-
Set
NODE_ENV=productionin.env -
Ensure Cloudinary and MongoDB credentials are set
-
Deploy to:
- Vercel/Netlify (Node.js support)
- Heroku
- AWS (EC2, Lambda)
- DigitalOcean
- Custom VPS
Example Vercel deploy:
npm install -g vercel
vercel- Ensure MongoDB is running locally or MongoDB Atlas cluster is configured
- Check
MONGODB_URIin.env
- Verify Cloudinary credentials
- Check file size limits (max 10MB)
- Ensure supported formats (JPG, PNG, WebP)
npm run build-css# Use different port
PORT=3001 npm start- Email notifications for contact forms
- Photo gallery with filters
- Blog section
- Client testimonials carousel
- Newsletter subscription
- Social media integration
- Multi-language support
- Payment integration for quotes
- Analytics dashboard
For issues or questions:
- Check the console for errors
- Verify all environment variables are set
- Ensure all dependencies are installed
- Check MongoDB connection
MIT License
Built with ❤️ for Dslabguy Interiors