Skip to content

Commit aaa3f19

Browse files
authored
Merge pull request #9 from marmoure/doc/readme
Add a comprehensive readme to the project
2 parents d15b894 + 17e99f5 commit aaa3f19

1 file changed

Lines changed: 114 additions & 8 deletions

File tree

README.md

Lines changed: 114 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,133 @@
1-
## Requirements
2-
- Java 21
3-
- Maven 3.6+
1+
# Broadband Label file Validator Service
2+
This project provides a solution for validating Broadband Label files against defined Schemas. Developed for [Comcast](https://www.comcast.com) by [Evolved Binary](https://www.evolvedbinary.com) for use with the [FCC Broadband Labels](https://www.fcc.gov/broadbandlabels) initiative, the system consists of a HTTP REST API and a user-friendly Web Application.
3+
4+
The core validation logic is built upon the Open Source [CSV Validator](https://github.com/digital-preservation/csv-validator) library, originally developed for [The National Archives](https://www.nationalarchives.gov.uk/).
5+
6+
## Features
7+
8+
* **HTTP REST API**: A robust API that exposes validation services to the internet.
9+
* **Web Application**: A simple HTML5 interface allowing users to upload files or provide URLs for validation.
10+
* **Multiple Input Methods**: Support for validating Broadband Label files via direct file upload or external URL retrieval.
11+
* **Schema Management**: dynamically lists and utilizes validation schemas stored in the configured directory.
12+
13+
## Endpoints
14+
Check the API documentation for more information https://app.swaggerhub.com/apis/evolvedbinary/bbl-validator-web-api/1.0.0#/schema/validateCsv.
15+
16+
## Built With
17+
18+
* [Java 21](https://openjdk.org/projects/jdk/21/) - Programming Language
19+
* [Micronaut 4](https://micronaut.io/) - A Web Application framework
20+
* [Apache Velocity](https://velocity.apache.org/) - Provides templating for the Web Pages
21+
* [Maven](https://maven.apache.org/) - Build System
22+
* [Docker](https://www.docker.com/) - Containerization
23+
24+
25+
# Getting Started
26+
27+
## Prerequisites
28+
* Java 21
29+
* Maven 3.6+
430

531
## Running the Application
632

7-
### Using Maven:
33+
### Option 1: Running in Development Mode
34+
35+
Clone the repository and run the application directly using Maven:
36+
837
```bash
9-
mvn clean compile
38+
git clone https://github.com/evolvedbinary/bbl-validator.git
39+
cd bbl-validator
40+
mvn mn:run
1041
```
1142

43+
The application will start on http://localhost:8080.
44+
45+
### Option 2: Building and Running the JAR
46+
47+
#### Building the JAR
48+
49+
Build an executable JAR file with all dependencies included:
50+
1251
```bash
13-
mvn mn:run
52+
git clone https://github.com/evolvedbinary/bbl-validator.git
53+
cd bbl-validator
54+
mvn clean package
1455
```
1556

16-
## Using Docker:
57+
This will create an executable JAR file at `target/bbl-validator-1.0.0-SNAPSHOT.jar`.
58+
59+
#### Running the JAR
60+
61+
Once built, you can run the application using:
1762

1863
```bash
64+
# Change the server port
65+
java -Dmicronaut.server.port=9090 -jar target/bbl-validator-1.0.0-SNAPSHOT.jar
66+
67+
# Specify a schema directory
68+
java -Dschema.directory=/path/to/schema -jar target/bbl-validator-1.0.0-SNAPSHOT.jar
69+
```
70+
71+
### Option 3: Using Docker
72+
73+
#### Pulling and Running a Pre-built Image
74+
75+
Pull the latest image from Docker Hub and run it:
76+
77+
```bash
78+
docker pull evolvedbinary/bbl-validator:1.0.0-SNAPSHOT
79+
docker run -p 8080:8080 -v /path/to/schemas:/app/schemas:ro evolvedbinary/bbl-validator:1.0.0-SNAPSHOT
80+
```
81+
82+
**Note:** Replace `/path/to/schemas` with the absolute path to your schemas directory on the host machine.
83+
84+
#### Building the Docker Image (Optional)
85+
86+
If you want to build the Docker image locally:
87+
88+
```bash
89+
git clone https://github.com/evolvedbinary/bbl-validator.git
90+
cd bbl-validator
1991
mvn clean install
2092
```
21-
Use the absolute path to the schemas directory when running the docker container.
93+
94+
This will:
95+
1. Build the application JAR
96+
2. Create a Docker image tagged as `evolvedbinary/bbl-validator:1.0.0-SNAPSHOT`
97+
98+
Then run the locally built image:
2299

23100
```bash
24101
docker run -p 8080:8080 -v /path/to/schemas:/app/schemas:ro evolvedbinary/bbl-validator:1.0.0-SNAPSHOT
25102
```
26103

104+
## Usage
105+
106+
### Web Interface
107+
Navigate to http://localhost:8080/views/validate in your browser. You can:
108+
109+
1. Select a Schema ID from the dropdown.
110+
111+
2. Choose to validate via URL or Content.
112+
113+
3. View the validation status and any error messages in the results table.
114+
115+
### HTTP API
116+
You can validate files programmatically using the API. Full documentation is available via:
117+
118+
Online: [SwaggerHub API Docs](https://app.swaggerhub.com/apis/evolvedbinary/bbl-validator-web-api/1.0.0#/schema/validateCsv)
119+
120+
Local Spec: The OpenAPI YAML file is available at `/static/openapi.yaml` on the running server.
121+
122+
## Configuration
123+
The application uses application.yml for configuration.
124+
125+
* Server Port: Defaults to `8080`.
126+
* Schema Directory: Defaults to `schemas` relative to the working directory.
127+
128+
## Contact and Support
129+
Evolved Binary Limited
130+
131+
Email: tech@evolvedbinary.com
27132

133+
Web: https://www.evolvedbinary.com

0 commit comments

Comments
 (0)