Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safe360 - Enterprise Safety Training Platform

Safe360 is a comprehensive web application for managing enterprise safety training, products, and services. It features a modern MERN stack architecture with a robust backend API and a dynamic React frontend.

🚀 Features

  • Corporate Website: Dynamic pages for Home, About, Services, Products, and Careers.
  • Content Management System (CMS):
    • Blog Management: Create, edit, and publish safety articles with author attribution.
    • Job Board: Manage career listings and review job applications.
    • Team Management: Update team member profiles and roles.
    • Page Content: Edit static page content via the admin dashboard.
  • User Management: Admin authentication, profile management, and role-based access.
  • Media Library: Manage uploaded images and documents.
  • Analytics: Dashboard overview of site activity and content metrics.
  • SEO Optimized: Built-in meta tag management for better search engine visibility.

🛠 Tech Stack

  • Frontend: React (Vite), TailwindCSS, Framer Motion, Lucide React
  • Backend: Node.js, Express, MongoDB, Mongoose
  • Authentication: JWT (JSON Web Tokens), Argon2
  • Testing: Node.js native test scripts

📂 Project Structure

Safe360/
├── automation/                 # Automation Scripts (Not for deployment)
│   ├── generate-pdfs.js        # PDF Generation
│   └── generate-screenshots.js # Screenshot Capture
├── client/                     # React Frontend Application
│   ├── public/                 # Static Assets (favicon, manifest)
│   ├── src/                    # Application Source Code
│   │   ├── components/         # Reusable UI Components
│   │   ├── context/            # Global Context Providers
│   │   ├── pages/              # Page Components (Routes)
│   │   └── ...
│   ├── index.html              # HTML Entry Point
│   ├── vite.config.js          # Vite Bundler Configuration
│   ├── tailwind.config.js      # TailwindCSS Configuration
│   └── postcss.config.js       # PostCSS Configuration
├── server/                     # Node.js/Express Backend
│   ├── middleware/             # Custom Middleware (Auth, Uploads)
│   ├── models/                 # Mongoose Database Schemas
│   ├── routes/                 # API Endpoint Definitions
│   ├── test_cases/             # Validation & Test Scripts
│   ├── uploads/                # Local File Storage (Media/Docs)
│   ├── server.js               # Server Entry Point
│   └── env.example             # Environment Variable Template
├── .gitignore                  # Git Ignored Files
├── eslint.config.js            # Code Linting Configuration
└── README.md                   # Project Documentation

⚙️ Prerequisites

  • Node.js: v18.0.0 or higher
  • MongoDB: Local instance running on port 27017 or a MongoDB Atlas connection string.
  • Git: For version control.

📦 Installation & Setup

1. Backend Setup

  1. Navigate to the server directory:
    cd server
  2. Install dependencies:
    npm install
  3. Environment Configuration:
    • Copy the example environment file:
      cp env.example .env
      (Windows: copy env.example .env)
    • Open .env and configure your settings:
      MONGO_URI=mongodb://localhost:27017/safe360
      PORT=5001  # Must be 5001 for client compatibility
      JWT_SECRET=your_secure_secret_key_here
  4. (Optional) Seed Application Data: Populate the database with initial users, jobs, and blog posts:
    node test_cases/scripts/seed.js
  5. Start the Development Server:
    npm run dev
    Server will start on http://localhost:5001

2. Frontend Setup

  1. Open a new terminal and navigate to the client directory:
    cd client
  2. Install dependencies:
    npm install
  3. Start the Development Server:
    npm run dev
  4. Open your browser to the URL shown (usually http://localhost:5173).

3. Admin Access

  • Login URL: /admin/login
  • Default Credentials (if seeded):
    • Username: admin
    • Password: password123

Verified Environment: Windows 11, Node v18+, MongoDB v6.0. Last Application Verification: 2026-01-04

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages