1. Purpose of the document and administrator roles
The document is intended for specialists who configure and maintain CShark software at the customer’s site.
Daily work with the system is described in a separate document "User Guide", deployment - in the document “Instructions for installing a copy of the software”.
| Role | Area of responsibility |
|---|---|
| System administrator | object topology, devices, cameras, displays, integrations, system parameters, update |
| Parking administrator | event processing rules, zone modes, operators and their rights |
| Customer system engineer | infrastructure, backup, monitoring, network |
Rights are delineated by role model (section 12); the division into roles above is organizational.
2. Software composition and placement of components
| Service | Purpose | Port |
|---|---|---|
core | application server: application logic, REST API, WebSocket, event consumers | internal |
gateway | device gateway: receiving camera events and controlling the scoreboard | 18010/tcp |
web | web interface and single point of access to API | 8088/tcp |
postgres | PostgreSQL 17 database | internal |
nats | NATS JetStream event bus | internal |
seaweedfs | object frame storage, S3 protocol | 18333/tcp |
The observability profile is included in the verification kit; published by Grafana on 13000/tcp, its remaining services are available only within the Compose network.
All services run in containers within a closed network perimeter of the facility. Calls to external services are not executed during operation.
3. Service management
Working directory: /opt/cshark-stand.
# service status
sudo docker compose --env-file /opt/cshark-stand/.env \
-f /opt/cshark-stand/compose.yml --profile obs ps
# start
sudo docker compose --env-file /opt/cshark-stand/.env \
-f /opt/cshark-stand/compose.yml --profile obs up -d
# stop
sudo docker compose --env-file /opt/cshark-stand/.env \
-f /opt/cshark-stand/compose.yml --profile obs stop
# restart one service
sudo docker compose --env-file /opt/cshark-stand/.env \
-f /opt/cshark-stand/compose.yml restart core
# service logs
sudo docker compose --env-file /opt/cshark-stand/.env \
-f /opt/cshark-stand/compose.yml logs -f core
4. Settings
The parameters are set by environment variables (file .env next to the service description file). After changing the settings, the service must be restarted.
| Variable | Purpose | Default value |
|---|---|---|
CSHARK_DATABASE_URL | database connection string | — |
CSHARK_NATS_URL | event bus address | nats://nats:4222 |
CSHARK_S3_ENDPOINT_URL | object storage address | http://seaweedfs:8333 |
CSHARK_S3_PUBLIC_ENDPOINT_URL | storage address for generating links to the client | — |
CSHARK_S3_ACCESS_KEY, CSHARK_S3_SECRET_KEY | storage access keys | — |
CSHARK_S3_BUCKET | object container | cshark-media |
CSHARK_AUTH_ENFORCE | mandatory authentication | true |
CSHARK_AUTH_SECRET | session token signing secret | set during installation |
CSHARK_CORS_ORIGINS | allowed web interface sources | — |
CSHARK_WEB_PORT | web interface publishing port | 8088 |
CSHARK_OTEL_ENDPOINT | telemetry collector address | not specified |
5. Initial setup of the object
When you log in for the first time, the Initial Setup Wizard is available. Sequence:
- Change the password for the built-in administrator account.
- Create an object (parking), levels, zones, parking spaces.
- Load the graphic background of the level and place objects on the diagram.
- Register cameras and link them to parking spaces.
- Create templates and devices for information boards.
- Set up a graph of reachability zones and entry points.
- Create operator roles and accounts.
- Configure event processing rules.
6. Setting up topology and circuit
Section “Administration” → “Topology”.
Hierarchy: organization → parking → level → zone → parking space.
| Action | Order |
|---|---|
| Creating a Level | indicate the name and serial number |
| Create a zone | indicate the name, level reference, type |
| Creation of a parking space | indicate the code (unique within the object), zone, type |
| Loading a Level Underlay | download the graphic file of the level plan |
| Placement on the diagram | set the coordinates and shape of parking spaces, zones and devices in the diagram editor |
Parking space codes are displayed to users and must correspond to the markings on the site.
7. Setting up video analytics cameras
Section "Equipment".
- Configure the camera to send events to the device gateway address (vendor protocol over HTTP). The address and port are specified in the camera settings.
- The camera that accesses the system appears in the list of undetected devices.
- Register a camera: set the name, network address, location.
- Link the camera to the parking spaces it serves.
- Check the arrival of events: the status of the associated parking space should change when the situation changes.
Performance monitoring is performed automatically based on periodic presence signals. The device status is displayed in the “Equipment” section and on the site diagram. The history of state changes is saved.
For devices that support control, command transmission via the command channel is available.
8. Setting up information boards
Section "Scoreboard".
8.1. Templates
The template describes the layout of the frame and consists of regions:
| Region type | Contents |
|---|---|
| Text | arbitrary text with context value substitution |
| Free seats counter | number of available spaces in a zone or object |
| direction arrow | direction of movement to the zone |
| Image | static image |
| QR code | link encoded into image |
| Level map | level diagram for high resolution monitors |
| Zone table | zone summary |
| Indicator | numerical indicator |
The font size is automatically adjusted to the size of the region; If the region's capacity is insufficient, a warning is issued when saving the template.
8.2. Display devices
- Create a device, select a class: text LED panel (EK07, TCP/RS-485 protocol) or web kiosk on a high-resolution monitor.
- Specify connection parameters.
- Link template, zone and entry point.
- Check the result by previewing the generated frame.
A public address of the form is generated for the web kiosk /kiosk/display/<identifier>?token=<token>; the monitor opens this page in kiosk mode. The token restricts access to content.
8.3. Content Priorities
Emergency → manual replacement → schedule → staffing. Emergency content (fire or shelter mode) supersedes any other content and cannot be replaced manually.
8.4. Addressee of texts
The reasons for unavailability are divided into public (displayed to the driver) and administrative (available only to staff). Administrative texts are not physically present in the public kiosk response and in the WebSocket stream. The diagnostic status of the display is available at /api/displays/{id}/state for authenticated personnel only.
10. Setting object modes and zones
Zone and object states: staff, fire, shelter, maintenance.
| Mode change method | Order |
|---|---|
| Manually | section “Administration” → “Zones” → mode selection |
| Automatically | according to a signal from fire automatic systems through a device gateway |
Changing the mode instantly changes: the availability of parking spaces in the zone, the contents of information boards (emergency content receives the highest priority), the rules for processing events, and the composition of notifications.
The administrator returns to normal mode manually after eliminating the cause.
11. Setting up event processing rules
Section “Administration” → “Rules”.
The rule is set according to the following scheme:
trigger (event type) × region (object, zone, group of places, specific place) × condition (time, status, other signs) → actions
Available actions: notify the operator, create an incident, change the status, send a command to the device.
The rule takes effect without restarting services. The order in which rules are applied is determined by their priority.
Examples: “violation of markings in an area for people with limited mobility → create a critical level incident”; “The parking space at the entrance has been occupied for more than 10 minutes without permission → notify the shift supervisor.”
12. Managing users, roles and rights
Section “Administration” → “Users” and “Roles”.
- Permissions are set in a single space of the form “resource:action” (for example,
displays:manage,users:manage). - A role is a named set of permissions. The user is assigned a role; Additionally, individual permits may be issued.
- Sections of the interface that are not accessible to the user due to rights are not displayed in the navigation.
- User actions are recorded in the action log.
Password requirements: at least 6 characters. Passwords are stored in the form of hashes (bcrypt algorithm); they are not stored or transmitted in clear text.
Sessions are implemented by signed tokens; the signature secret is specified by the parameter CSHARK_AUTH_SECRET. Changing the secret ends all active sessions.
13. Setting up integration with external systems
Section “Administration” → “Integrations”.
| Opportunity | Description |
|---|---|
| REST API | facility directories, availability of parking spaces, receiving information about sessions of an external access control system; The OpenAPI specification is available at /openapi.json |
| Access keys | are created with visibility scopes and request rate limits |
| Outgoing webhooks | subscribing an external system to events; requests are signed, delivery is repeated if there is an error |
Interaction with a partner automated parking system (entrance group) is performed through these mechanisms.
14. Data retention and retention policies
| Data | Storage location | Shelf life |
|---|---|---|
| Directories, topology, users | database | indefinitely |
| Visits, parking lot events, occupancy snapshots | regular PostgreSQL tables with object and time indexes | determined by the approved operational policy |
| Event footage | object storage | customizable, consistent with event storage period |
| User activity log | database | customizable |
The storage period is set by policies in the system settings section. Footage is only available via limited-time links; direct public access to storage facilities is closed.
15. Backup and restore
15.1. Backup
tools/backup/backup.sh /path/to/backups
A database dump and media manifest are generated. Storage objects are copied separately using synchronization tools - the command is issued by the script. Recommended frequency: database - daily (according to the schedule on the host), media materials - weekly. The storage depth of copies is not less than the period of data storage in the system.
15.2. Checking the copy
Restoring to a temporary database without risk to the working one:
tools/backup/restore.sh backups/cshark-XXXX.dump cshark_restore_check
The script displays control counters (car spaces, visits, incidents, users) for reconciliation.
15.3. Recovery
Stop before recovery core and gateway via Compose file /opt/cshark-stand/compose.yml, execute the standard recovery script from the delivery and then start the same services. The commands and path to the backup copy are recorded in the work log; the restoration is first tested on a separate stand.
Media materials are restored by synchronization into an object container with verification against the manifest.
16. Monitoring and diagnostics
| Check | Command or address |
|---|---|
| Application health | curl -fsS http://127.0.0.1:8088/api/health |
| Service Status | sudo docker compose --env-file /opt/cshark-stand/.env -f /opt/cshark-stand/compose.yml --profile obs ps |
| Magazines | sudo docker compose --env-file /opt/cshark-stand/.env -f /opt/cshark-stand/compose.yml logs -f core |
The software generates metrics, logs and traces according to the OpenTelemetry standard. When the observability profile is enabled, Grafana panels are available.
Key indicators:
| Indicator | What does it mean |
|---|---|
| number of published events | receipt of data from equipment |
| number of events processed | operation of application server consumers |
| volume of unprocessed messages | growth means the server can't keep up or the consumer is stopped |
| number of connected WebSocket clients | active operator workplaces |
Personal and sensitive data are automatically excluded from the logs.
17. Software update
The update is initiated by the customer administrator. There are no mechanisms for forced updating and remote control from outside the perimeter of the facility.
The current release does not include automatic remote update. Before the implementation of a promising managed mechanism, the update is performed as a separate regulatory delivery: accept the signed offline kit, verify the SHA-256 and foreign key signature, create and verify a backup copy, execute the release-specific instructions and a full smoke-test. The operation is carried out by the administrator during the agreed maintenance window.
Migrations follow the expansion-compression principle: breaking schema changes are released in a release following the release of the code that runs without them. Therefore, reverting to a previous version of the code is safe and does not require a schema rollback.
Returns are only allowed on a previously saved and tested set of the previous version after assessing the compatibility of the data scheme. Arbitrarily changing the container tag in an installed instance is not a standard update.
18. Typical faults and solutions
| Sign | Probable Cause | Actions |
|---|---|---|
| Statuses of parking spaces are not updated | event delivery is broken | check camera availability; check device gateway logs; check the rate of unprocessed messages - if it increases, restart the application server |
| Events arrive without frames | object storage unavailable | check storage service; events are not lost, frames will be missing only during the period of unavailability |
| The scoreboard is not updating | display device unavailable | check the connection in the “Equipment” section; preview the frame - if the frame is formed, the problem is in the communication channel with the device |
| Web interface is not available | The service is not running or the port is busy | check the condition of containers; if there is a port conflict, set CSHARK_WEB_PORT and restart |
| The web interface restarts cyclically | lost container network | recreate the service with the key --force-recreate |
| All users are not logged in | changed the token signing secret | check CSHARK_AUTH_SECRET; after changing the secret, re-login is required |
| Error loading frames into storage indicating time discrepancy | host and container clock divergence | synchronize host time via NTP |
| Database volume is growing | retention policies are not configured | set the storage period for events and frames in system settings |
19. Location of files and components
| Component | Location |
|---|---|
| Service Description File | /opt/cshark-stand/compose.yml |
| Environment Settings | /opt/cshark-stand/.env |
| Primary details | /opt/cshark-stand/INITIAL-CREDENTIALS.txt |
| Installation log | /opt/cshark-stand/install.log |
| Database data | Docker volume pg_data |
| Object storage data | Docker volume seaweed_data |
| Event Bus Data | Docker volume nats_data |
| Application server source code (inside the image) | /app/apps/core/app/ |
| Device gateway source text (inside the image) | /app/apps/gateway/gateway/ |
| Database schema migrations | /app/apps/core/alembic/versions/ |
| Static web interface files | /usr/share/nginx/html/ in the web interface container |
| Software Interface Specification | http://<address>:8088/openapi.json |
| Interactive API documentation | http://<address>:8088/docs |
Access inside the container:
sudo docker compose --env-file /opt/cshark-stand/.env \
-f /opt/cshark-stand/compose.yml exec core sh
docker run --rm cshark-core:<version> cat /etc/os-release # base OS of the image
20. Technical support
| Channel | Meaning |
|---|---|
| Organization | LLC "KOMPETENTSIA" |
| Phone | +7 495 532-61-18 |
| Operating mode | Monday–Friday, 09:00–18:00 Moscow time |
| Support address | 115280, Moscow, st. Leninskaya Sloboda, 21, building 1 |
The procedure for processing requests, priorities and response times are given in the document “Description of processes ensuring maintenance of the software life cycle”.