SnailyCADv4

repository·main·Indexed 41 days ago

https://github.com/snailycad/snaily-cadv4

An open-source, web-based Computer Aided Dispatch (CAD) system for FiveM communities, designed to facilitate police roleplaying and dispatching. It features a backend API, a frontend client, and optional Discord and FiveM integrations. The system includes specialized packages for shared configuration (@snailycad/config), permission management (@snailycad/permissions), data validation (@snailycad/schemas), and Prisma-generated database types (@snailycad/types).

Tokens
17.1K
Snippets
68
Records
93
Agent score
51%

What's inside SnailyCAD

  1. Overview of SnailyCAD

    main
    SnailyCAD is an open-source, web-based Computer Aided Dispatch (CAD) system designed specifically for FiveM communities. It provides tools for police roleplaying and dispatching, featuring optional integrations for Discord and FiveM to streamline community operations.
  2. Overview of @snailycad/config

    main
    The @snailycad/config module serves as a centralized repository for shared configuration constants used across the SnailyCAD ecosystem. It provides standardized definitions for common values to ensure consistency between different packages (such as the API, client, and UI). Key constants provided by this module include SocketEvents for WebSocket communication and Cookie definitions for session management.
  3. Overview of SnailyCADv4 packages

    main
    SnailyCADv4 is composed of several specialized packages that work together to provide configuration, permission management, data validation, and utility functions. Developers building on or integrating with SnailyCADv4 will interact with these packages depending on whether they are working on the client-side, API-side, or database layer.
  4. Understand the SnailyCADv4 application structure

    main

    SnailyCADv4 is split into two primary application components located in the apps/ directory:

    • api/: The backend service that powers the SnailyCADv4 API. It is responsible for processing all incoming requests and managing application state.
    • client/: The frontend application. This is the user interface that end users interact with in their web browsers.
  5. Use @snailycad/schemas for form and API request validation

    main
    The @snailycad/schemas module provides the validation logic used throughout the SnailyCAD ecosystem. It is primarily used to ensure that data submitted via forms or API requests conforms to the expected structure and constraints required by the system.
  6. Use @snailycad/types to share database types

    main
    The @snailycad/types module provides a centralized set of TypeScript definitions used to share database types across the entire SnailyCAD ecosystem. Developers should use this package to ensure type safety and consistency when interacting with database schemas or data structures shared between different parts of the CAD.
  7. Use the @snailycad/ui component library

    main

    The @snailycad/ui package provides a collection of reusable UI components including form fields, inputs, overlays, and layout elements. You can import these components directly from the package entry point.

    Commonly used component categories include:

    • Form Fields: SelectField, TextField, RadioGroupField, DatePickerField, AsyncListSearchField, SwitchField, and CheckboxField.
    • Inputs: Input and Textarea.
    • Overlays & Menus: Popover, Dropdown, Alert, ContextMenu, and HoverCard.
    • Layout & Navigation: Breadcrumbs, BreadcrumbItem, TabList, Accordion, and FormRow.
    • Specialized Components: JsonEditor, MultiForm, and Status components.