Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 1.65 KB

File metadata and controls

66 lines (52 loc) · 1.65 KB

Equipment Tracker

A simple web application to track equipment, built with React and Node.js.

Prerequisites

  • Node.js (v14 or higher)
  • npm

Folder Structure

/
  server/       # Backend (Node.js + Express)
  client/       # Frontend (React)
  README.md     # This file

Getting Started

1. Setup Backend

  1. Navigate to the server directory:
    cd server
  2. Install dependencies:
    npm install
  3. Start the server:
    npm start
    The backend will run on http://localhost:5000.

2. Setup Frontend

  1. Open a new terminal and navigate to the client directory:
    cd client
  2. Install dependencies:
    npm install
  3. Start the application:
    npm start
    The application will open at http://localhost:3000.

Assumptions Made

  • Data Storage: Using a local JSON file (server/data/equipment.json) instead of a database for simplicity and portability.
  • Concurrency: File locking is not implemented, so high concurrency might overwrite data (acceptable for this scope).
  • Validation: Basic frontend validation exists; backend validation checks for existence of required fields.
  • IDs: Simple timestamp-based ID generation.

Future Improvements

  • Database: Migrate to SQLite or PostgreSQL for robust data management.
  • Validation: Add a library like Joi or Zod for stricter backend validation.
  • Testing: Add Unit and Integration tests (Jest/React Testing Library).
  • UI library: Use Material UI or Tailwind CSS for better responsiveness and accessibility.
  • Docker: Add Docker support for easier deployment.