Skip to content

mozyonee/mdc

Repository files navigation

MDC - Mobile Data Computer

A modern, high-performance Mobile Data Computer (MDC) system built with the Next.js App Router, TypeScript, and Tailwind CSS. This project is designed to handle complex data management—such as records, tickets, and searches—with a focus on speed, security, and a clean user interface.

🚀 Tech Stack

  • Framework: Next.js (App Router)
  • Language: TypeScript (Strict Mode)
  • Styling: Tailwind CSS
  • Database: MySQL (via src/lib/db.ts)
  • Icons/Assets: Custom vehicle and skin assets stored in public/

📂 Project Structure

The project follows a feature-based modular architecture to ensure scalability:

  • src/app/: Core routing, layouts, and API route handlers.
  • src/features/: Modular business logic. Each feature (e.g., search, office) contains its own:
    • components/: Feature-specific UI.
    • hooks/: Custom React hooks.
    • api/: API client helpers.
    • utils/: Constants and helper functions.
  • src/components/: Shared, reusable UI components.
  • src/lib/: Shared infrastructure (Database connection logic, etc.).
  • src/types/: App-wide TypeScript definitions and augmentations.

🛠️ Getting Started

Prerequisites

  • Node.js (Latest LTS recommended)
  • npm
  • A MySQL instance

Installation

  1. Clone the repository:

    git clone https://github.com/mozyonee/mdc.git
    cd mdc
  2. Install dependencies:

    npm install
  3. Configure environment variables: Create a .env.local file in the root directory and add your database credentials:

    DB_HOST=your_host
    DB_PORT=3306
    DB_USER=your_user
    DB_PASS=your_password
    DB_NAME=your_database
    NEXTAUTH_SECRET=secret
    NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=api_key

Development

Run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

📜 Available Scripts

  • npm run dev: Starts the development server.
  • npm run build: Creates an optimized production build.
  • npm start: Serves the production build.
  • npm run lint: Runs ESLint to check for code quality issues.

🔐 Security & Coding Standards

  • Strict Typing: All features must adhere to strict TypeScript configurations.
  • Environment Safety: Database credentials and secrets are managed via .env files and are never committed to version control.
  • Modular Code: Prefer feature-scoped logic over bloated global utilities.

🤝 Contributing

For detailed information on coding styles, naming conventions, and commit guidelines, please refer to AGENTS.md.

📄 License

This project is licensed under the MIT License.

About

police computer for chiliad.rp server

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages