A beautiful and modern full-stack web application for showcasing handloom products with admin authentication and contact management.
- Responsive Design: Modern, mobile-friendly interface
- Admin Authentication: Secure login system with beautiful two-panel design
- Contact Management: Contact form with backend integration
- Beautiful UI: Clean design with improved visibility and user experience
- Full-Stack Architecture: React frontend with Node.js backend
- React.js - Component-based UI library
- CSS3 - Modern styling with responsive design
- React Router - Client-side routing
- Context API - State management
- Node.js - Server runtime
- Express.js - Web framework
- MongoDB - Database
- JWT - Authentication tokens
- bcrypt - Password hashing
Handloom_Website/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ │ ├── Admin/ # Admin dashboard components
│ │ │ ├── Auth/ # Authentication components
│ │ │ ├── Common/ # Shared components
│ │ │ └── Layout/ # Layout components
│ │ ├── context/ # React context providers
│ │ ├── hooks/ # Custom React hooks
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── styles/ # Global styles
│ │ └── utils/ # Utility functions
│ └── package.json
└── server/ # Node.js backend
├── config/ # Database configuration
├── middleware/ # Express middleware
├── models/ # Database models
├── routes/ # API routes
├── server.js # Entry point
└── package.json
- Node.js (v14 or higher)
- npm or yarn
- MongoDB
-
Navigate to the server directory:
cd server -
Install dependencies:
npm install
-
Create a
.envfile with your environment variables:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key
-
Start the server:
npm start
-
Navigate to the client directory:
cd client -
Install dependencies:
npm install
-
Start the development server:
npm start
The application will open in your browser at http://localhost:3000
- Two-Panel Design: Beautiful split-screen layout with form on the left and background image on the right
- Social Login Options: Google and Apple login integration ready
- Responsive: Adapts to different screen sizes
- Improved Visibility: White background with proper contrast for better readability
- Centered Layout: Professional "Get In Touch" heading
- Form Validation: Built-in validation for user inputs
- Clean Design: Simplified button styling with transparent backgrounds
- Consistent Branding: Unified design language across all components
- Home - Landing page with hero section
- About - Information about the handloom business
- Articles - Blog/article management system
- Contact - Contact form and information
- Admin Dashboard - Admin panel for content management
The application includes a secure authentication system with:
- User registration and login
- JWT token-based authentication
- Protected routes for admin access
- Password encryption using bcrypt
POST /api/auth/register- User registrationPOST /api/auth/login- User login
GET /api/articles- Get all articlesPOST /api/articles- Create new article (admin only)PUT /api/articles/:id- Update article (admin only)DELETE /api/articles/:id- Delete article (admin only)
POST /api/contact- Submit contact formGET /api/contact- Get all contact submissions (admin only)
The React app can be deployed to platforms like:
- Vercel
- Netlify
- GitHub Pages
The Node.js server can be deployed to:
- Heroku
- Railway
- DigitalOcean
- AWS
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Ankit Singh
- GitHub: @Ankit052003
- Email: ankitaur2022@gmail.com