Skip to content

jjstratton/jag-traffic-courts-online

 
 

Repository files navigation

Maintainability Test Coverage

img Cucumber Tests

jag-traffic-courts-online

Welcome to Traffic Courts Online

Project Structure

    ├── .github                                 # Contains GitHub Related sources
    ├── docs                                    # docs and images
    │   └── data-model                          # Oracle designer data model
    ├── splunk-dash-board
    ├── src                                      # application source files
    │   ├── backend                              # Backend code
    │       └── oracle-data-interface            # An Oracle Interface API
    │   └── frontend                             # Frontend code
    ├── tools
    ├── COMPLIANCE.yaml
    ├── CONTRIBUTING.md
    ├── docker-compose.yml
    ├── LICENSE                                  # Apache License
    └── README.md                                # This file

Apps

Name Description Doc
backend all server side services
citizen api base citizen api README
ticket search api ticket search api called from citizen api README
frontend all client side applications README

Citizen Service (API)

Configuration

Key Description Default
RabbitMQ:Host
RabbitMQ:Port
RabbitMQ:Username
RabbitMQ:Password
MassTransit:Transport InMemory or RabbitMQ
FormRecognizer:ApiKey
FormRecognizer:Endpoint
TicketSearchClient:Address

Docker

Download and install Docker

Run docker-compose

Copy the .env.template to .env and then run docker-compose up. Add the configuration for token and password for splunk. Default user is admin. Password is what is configured in .env

REDIS__HOST will be redis which is the service name.

docker-compose up

Examples

Develop the citizen-portal. Run the associated API, citizen-api. This starts the required services:

  • citizen-api
  • rabbitmq
  • ticket-search
docker-compose -f docker-compose.yml up -d citizen-api

Run citizen-api and have the backend logs go to local Seq,

docker-compose -f docker-compose.yml -f ./.docker/docker-compose.seq.yml up -d citizen-api

To stop when running Seq,

docker-compose -f docker-compose.yml -f ./.docker/docker-compose.seq.yml down

Run citizen-api and have the backend logs go to local Splunk

Note, this is currently getting an error: "Error response from daemon: network ... not found"

docker-compose -f docker-compose.yml -f ./.docker/docker-compose.splunk.yml up -d citizen-api

To stop when running Splunk,

docker-compose -f docker-compose.yml -f ./.docker/docker-compose.splunk.yml down

The frontend app citizen-portal will be accessible in the browser at http://localhost:8080

To remove services run (all services and networking)

docker-compose down

Services

Service URL Notes
citizen-portal http://localhost:8080/
citizen-api http://localhost:5000/swagger/index.html
staff-portal http://localhost:8081/
ticket-search n/a grpc
oraface-api http://localhost:5010/
rabbitmq localhost:5672, localhost:15672
minio http://localhost:9001/login
redis localhost:6379
redis-commander http://localhost:8082
splunk http://localhost:8000
seq http://localhost:8001
jaeger http://localhost:16686

Logging

Developers can choose how logging is configured in the running apps. Developer can choose Splunk or Seq.

Splunk

The default docker-compose.yaml file does NOT contain Splunk configuration. To use/test with Splunk, you can include a docker-compose override to configure Splunk for the requested services, ie,

docker-compose -f docker-compose.yml -f ./.docker/docker-compose.splunk.yml up

Open Local Splunk to view logs. Login with username: admin, password: password.

Splunk

A custom configuration file, ./.docker/splunk-dev-config.yaml is used to adjust the default settings. A key setting is disabling the SSL on the HEC endpoint.

See Splunk Docker examples for more information.

Seq

Seq is an alternative logging source that is more developer friendly, especially those unfamilar with Splunk.

docker-compose -f docker-compose.yml -f ./.docker/docker-compose.seq.yml up

Open Local Seq to view logs.

Redis

By default, redis runs in Standalone mode (a single container). To run the project where redis is configured to run in sentinel mode (a high-availability failover configuration), specify the redis override file and run:

docker-compose -f docker-compose.yml -f ./.docker/docker-compose.redis.yml up -d

About

Traffic Courts Citizen's Portal

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 63.0%
  • C# 17.3%
  • HTML 7.6%
  • Java 4.0%
  • SCSS 3.8%
  • Mustache 1.8%
  • Other 2.5%