Skip to content

Latest commit

Β 

History

History
255 lines (195 loc) Β· 5.51 KB

File metadata and controls

255 lines (195 loc) Β· 5.51 KB

Stackora Technologies - Full Stack Application

A complete full-stack web application for Stackora Technologies with backend API, React frontend, and admin dashboard.

πŸ—οΈ Architecture

stackora-app/
β”œβ”€β”€ backend/              # Node.js + Express API
β”‚   β”œβ”€β”€ models/          # MongoDB schemas
β”‚   β”œβ”€β”€ routes/          # API endpoints
β”‚   β”œβ”€β”€ middleware/      # Auth & validation
β”‚   └── server.js        # Main server file
β”œβ”€β”€ frontend/            # React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/  # Reusable components
β”‚   β”‚   β”œβ”€β”€ pages/       # Page components
β”‚   β”‚   └── api/         # API client
β”‚   └── public/
└── uploads/             # File uploads (resumes, images)

πŸš€ Features

Public Website

  • Modern landing page with hero section
  • Dynamic services showcase
  • Career listings with filtering
  • Contact form with email notifications
  • Project portfolio
  • Fully responsive design

Admin Dashboard

  • Secure authentication (JWT)
  • Manage services, projects, careers
  • View and respond to contact inquiries
  • Review job applications
  • Upload and manage content

Backend API

  • RESTful API architecture
  • MongoDB database
  • JWT authentication
  • File upload handling
  • Email notifications
  • Rate limiting & security

πŸ“‹ Prerequisites

  • Node.js (v16 or higher)
  • MongoDB (local or Atlas)
  • npm or yarn

πŸ› οΈ Installation

1. Install Dependencies

# Install backend dependencies
npm install

# Install frontend dependencies
cd frontend && npm install

2. Environment Setup

Create a .env file in the root directory:

PORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/stackora
JWT_SECRET=your_secure_jwt_secret_key_change_this
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password
ADMIN_EMAIL=admin@stackora.com
FRONTEND_URL=http://localhost:3000

3. Create Upload Directories

mkdir -p uploads/resumes
mkdir -p uploads/projects

4. Create Initial Admin User

Run this script to create your first admin:

node backend/scripts/createAdmin.js

Or use MongoDB directly:

// In MongoDB shell or Compass
db.admins.insertOne({
  name: "Admin",
  email: "admin@stackora.com",
  password: "$2a$12$hashed_password_here", // Use bcrypt to hash
  role: "super-admin",
  isActive: true,
  createdAt: new Date()
})

πŸƒ Running the Application

Development Mode

# Run both backend and frontend concurrently
npm run dev

# Or run separately:
# Terminal 1 - Backend
npm run server

# Terminal 2 - Frontend
cd frontend && npm start

Production Mode

# Build frontend
cd frontend && npm run build

# Start backend (serves built frontend)
npm start

πŸ“‘ API Endpoints

Public Endpoints

  • 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

Admin Endpoints (Requires Authentication)

  • POST /api/admin/login - Admin login
  • GET /api/admin/me - Get current admin
  • POST /api/admin/create - Create new admin (super-admin only)

Protected CRUD Endpoints

  • Services: POST, PUT, DELETE /api/services
  • Careers: POST, PUT, DELETE /api/careers
  • Projects: POST, PUT, DELETE /api/projects
  • Contacts: GET, PATCH /api/contact
  • Applications: GET, PATCH /api/applications

πŸ” Security Features

  • JWT authentication
  • Password hashing with bcrypt
  • Rate limiting
  • Helmet.js security headers
  • CORS configuration
  • Input validation
  • File upload restrictions

πŸ“Š Database Models

Admin

  • name, email, password
  • role (super-admin, admin, editor)
  • isActive, lastLogin

Service

  • title, description, icon
  • features, pricing
  • isActive, order

Career

  • title, department, location, type
  • description, responsibilities, requirements
  • salary, isActive, applicationCount

Application

  • career reference
  • firstName, lastName, email, phone
  • resume, coverLetter, portfolio
  • status, notes

Project

  • title, description, client
  • category, tags, technologies
  • image, url, featured

Contact

  • name, email, phone, company
  • message, status, notes

🎨 Frontend Pages

  • / - Home page
  • /services - Services listing
  • /careers - Career opportunities
  • /careers/:id - Career details & application
  • /contact - Contact form
  • /admin/login - Admin login
  • /admin/* - Admin dashboard (protected)

πŸ“§ Email Configuration

For Gmail:

  1. Enable 2-factor authentication
  2. Generate an App Password
  3. Use the app password in .env

πŸš€ Deployment

Backend (Node.js)

  • Deploy to Heroku, Railway, Render, or DigitalOcean
  • Set environment variables
  • Connect to MongoDB Atlas

Frontend (React)

  • Build: cd frontend && npm run build
  • Deploy to Vercel, Netlify, or serve from backend

Database

  • Use MongoDB Atlas for production
  • Set up backups and monitoring

πŸ“ TODO / Future Enhancements

  • Blog/News section
  • Client testimonials
  • Newsletter subscription
  • Advanced analytics dashboard
  • Email templates
  • Multi-language support
  • Payment integration
  • Live chat support

🀝 Contributing

This is a proprietary application for Stackora Technologies.

πŸ“„ License

Proprietary - All rights reserved by Stackora Technologies

πŸ“ž Support

For support, email: support@stackora.com