A complete full-stack web application with:
- Backend: Node.js + Express + MongoDB
- Frontend: React with modern UI
- Admin Panel: Secure dashboard for content management
- Features: Services, Careers, Projects, Contact forms, Job applications
Windows:
# Download from: https://www.mongodb.com/try/download/community
# Or use MongoDB Atlas (cloud): https://www.mongodb.com/cloud/atlasAlternative - Use MongoDB Atlas (Recommended):
- Go to https://www.mongodb.com/cloud/atlas
- Create free account
- Create a cluster
- Get connection string
- Use it in
.envfile
# Install backend dependencies
npm install
# Install frontend dependencies
cd frontend
npm install
cd ..Create .env file in root directory:
PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/stackora
JWT_SECRET=stackora_secret_key_2025_change_this_in_production
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-gmail-app-password
ADMIN_EMAIL=admin@stackora.com
FRONTEND_URL=http://localhost:3000mkdir uploads
mkdir uploads\resumes
mkdir uploads\projectsnode backend/scripts/seedData.jsThis creates sample services, careers, and projects.
node backend/scripts/createAdmin.jsFollow the prompts to create your admin account.
# Start both backend and frontend
npm run devOr run separately:
# Terminal 1 - Backend
npm run server
# Terminal 2 - Frontend
cd frontend
npm start- Website: http://localhost:3000
- Admin Login: http://localhost:3000/admin/login
- API: http://localhost:5000/api
- Enable 2-Factor Authentication on your Gmail
- Go to: https://myaccount.google.com/apppasswords
- Generate an "App Password"
- Use this password in
.envasEMAIL_PASS
After running createAdmin.js, use the credentials you created.
Example:
- Email: admin@stackora.com
- Password: (what you set)
The application uses these collections:
admins- Admin usersservices- Service offeringscareers- Job postingsapplications- Job applicationsprojects- Portfolio projectscontacts- Contact form submissions
# Development
npm run dev # Run both frontend & backend
npm run server # Run backend only
npm run client # Run frontend only
# Database
node backend/scripts/seedData.js # Seed sample data
node backend/scripts/createAdmin.js # Create admin user
# Production
cd frontend && npm run build # Build frontend
npm start # Start production serverstackora-app/
βββ backend/
β βββ models/ # Database schemas
β βββ routes/ # API endpoints
β βββ middleware/ # Auth middleware
β βββ scripts/ # Utility scripts
β βββ server.js # Main server
βββ frontend/
β βββ public/
β βββ src/
β βββ components/ # Reusable components
β βββ pages/ # Page components
β βββ api/ # API client
β βββ App.js # Main app
βββ uploads/ # File uploads
βββ .env # Environment variables
βββ package.json # Dependencies
Edit frontend/src/index.css:
:root {
--color-accent: #ffd700; /* Change to your brand color */
--color-bg: #0a0a0a; /* Background color */
}Edit content in:
frontend/src/pages/Home.jsfrontend/src/components/Footer.js
Use the admin panel or directly in MongoDB:
- Login to admin panel
- Navigate to Services section
- Add/Edit/Delete services
- Push code to GitHub
- Connect to deployment platform
- Set environment variables
- Deploy
- Build:
cd frontend && npm run build - Deploy
frontend/buildfolder - Set API URL environment variable
- Create cluster on MongoDB Atlas
- Get connection string
- Update
MONGODB_URIin production
- Change
JWT_SECRETto a strong random string - Use MongoDB Atlas with authentication
- Enable HTTPS in production
- Set strong admin passwords
- Configure CORS properly
- Enable rate limiting
- Regular backups
GET /api/services # Get all services
GET /api/careers # Get all careers
GET /api/careers/:id # Get single career
GET /api/projects # Get all projects
POST /api/contact # Submit contact form
POST /api/applications # Submit job application
POST /api/admin/login # Admin login
GET /api/admin/me # Get current admin
POST /api/services # Create service
PUT /api/services/:id # Update service
DELETE /api/services/:id # Delete service
POST /api/careers # Create career
PUT /api/careers/:id # Update career
DELETE /api/careers/:id # Delete career
GET /api/applications # Get all applications
PATCH /api/applications/:id # Update application status
GET /api/contact # Get all contacts
PATCH /api/contact/:id # Update contact status
# Make sure MongoDB is running
# Windows: Check Services for "MongoDB"
# Or use MongoDB Atlas connection string# Change PORT in .env file
PORT=5001- Check Gmail app password
- Verify EMAIL_USER and EMAIL_PASS in .env
- Check Gmail security settings
# Clear cache and reinstall
cd frontend
rm -rf node_modules package-lock.json
npm installFor issues or questions:
- Email: support@stackora.com
- Check logs in terminal
- Review error messages
- β Complete setup
- β Create admin account
- β Seed sample data
- β Test all features
- π Customize content
- π¨ Update branding
- π Deploy to production
Built with β€οΈ for Stackora Technologies