GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mscbuild/CHMS_expressJS: 🚀 Process of building a Company Management System with Express.js.

BranchesTags
Open more actions menu

Latest commit

 

History

25 Commits
25 Commits

Folders and files

NameName
Last commit message
Last commit date
App
App
 
 
api
api
 
 
components
components
 
 
config
config
 
 
controllers
controllers
 
 
models
models
 
 
routes
routes
 
 
src
src
 
 
EmployeeList.js
EmployeeList.js
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Company Management System.

A simple Company Management System built with Express.js and MongoDB. This system allows for basic functionalities like user authentication, employee management, and more. It provides an API for managing employees and authenticating users.

Project Structure

company-management-system/
│
├── config/
│   └── db.js            # MongoDB connection configuration
├── controllers/          # API logic for different routes
│   └── employeeController.js
├── models/               # Mongoose models for database
│   └── Employee.js
│   └── User.js           # User model for authentication
├── routes/               # Route definitions
│   └── employeeRoutes.js
│   └── authRoutes.js     # Authentication routes (login/signup)
├── .env                  # Environment variables
├── server.js             # Main Express server file
└── package.json

Features

  • User Authentication: Register and log in using JWT authentication.
  • Employee Management: Create, read, update, and delete employee records.
  • Task Management: (Optional, can be added later)
  • Department Management: Organize employees by departments.
  • Leave & Attendance: (Optional, can be added later)
  • Payroll Management: (Optional, can be added later)

    Tech Stack.

  • Backend: Node.js with Express.j s
  • Database: MongoDB
  • Authentication: JSON Web Tokens (JWT)
  • Password Hashing: Bcrypt.js
  • Environment Variables: dotenv
  • Development Tools: Nodemon for automatic server reload

    Prerequisites.

    Installation.

    1. Clone the repository:
    git clone https://github.com/mscbuild/CHMS_expressJS.git cd CHMS_expressJS
    1. Install dependencies:

    Run the following command to install the necessary dependencies:

    npm install
    1. Set up environment variables:

    Create a .env file in the root directory and define the following environment variables:

    MONGO_URI=mongodb://localhost:27017/companyDB
    JWT_SECRET=your_jwt_secret_key
    PORT=5000

    MONGO_URI: Your MongoDB connection string. If you're using MongoDB Atlas, use the connection string provided by Atlas.

    JWT_SECRET: A secret key for JWT encoding.

    PORT: The port the application will run on (default is 5000).

    Running the Application

    To start the development server, use:

    npx nodemon server.js

    The server will run at http://localhost:5000 by default.

    API Endpoints.

    Authentication Routes.

  • POST /api/auth/register: Register a new user.
  • Request body: ```ruby { "username": "user1", "password": "password123" } ```
  • POST /api/auth/login: Login with existing credentials.
  • Request body: ```ruby { "username": "user1", "password": "password123" } ``` # Employee Management Routes.
  • POST /api/employees: Create a new employee.
  • Request body:
    {
      "name": "John Doe",
      "role": "Software Engineer",
      "department": "Engineering",
      "contact": "[email protected]",
      "salary": 70000
    }
  • GET /api/employees: Get all employees.

    Development

  • If you'd like to contribute or develop new features, follow these steps:
  • About

    🚀 Process of building a Company Management System with Express.js.

    Topics

    apichmscmsdevelopmentexspressjavajsmanagementmodelmscbuildnode-jsproyectreactroutervueweb

    Resources

    Readme
    MIT license
    Activity

    Stars

    5 stars

    Watchers

    1 watching

    Forks

    0 forks
    Report repository

    Releases

    Packages

    Contributors

    Languages

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.