The system uses Neon PostgreSQL database. The connection string is already configured in server/index.js.
- Username:
admin - Password:
admin123
-
Install Dependencies:
npm install
-
Configure Email (Optional):
- Edit
server/index.jsand update email configuration - For Gmail, you need to use an App Password
- Update
EMAIL_USERandEMAIL_PASSin the code
- Edit
-
Start the Server:
npm run server
Server will run on
http://localhost:5000 -
Start React App (in another terminal):
npm start
App will run on
http://localhost:3000OR run both together:
npm run dev
The system automatically creates two tables:
-
demo_requests - Stores demo request form submissions
- id, name, email, phone, company, requirements, created_at
-
admin_users - Stores admin user accounts
- id, username, password (hashed), email, created_at
POST /api/demo-request- Submit demo requestPOST /api/admin/login- Admin loginGET /api/admin/demo-requests- Get all demo requestsGET /api/admin/users- Get all admin usersPOST /api/admin/users- Create new admin userPUT /api/admin/users/:id- Update admin user passwordDELETE /api/admin/users/:id- Delete admin user
- Go to:
http://localhost:3000/admin/login - Login with:
admin/admin123 - You'll be redirected to the dashboard
- ✅ Admin login system
- ✅ Demo request form saves to database
- ✅ Email notification to users
- ✅ Admin dashboard with demo requests
- ✅ Admin user management (add, edit, delete)
- ✅ Protected routes
- Make sure the server is running before submitting demo requests
- Email functionality requires proper email configuration
- Default admin user is created automatically on first server start