Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# ndear-core-registries
NDEAR Core Registries

## Running
1. Clone the repository
2. Start docker compose, schema configuration from the repository are mounted on registry with this.
```
docker-compose up
```
3. Verify the api
```
curl -v localhost:8081/health

....
< HTTP/1.1 200
...
{"id":"open-saber.registry.health","ver":"1.0","ets":1628838471525,"params":{"resmsgid":"","msgid":"fe01f054-5c6e-4f16-887c-9f1b15cee937","err":"","status":"SUCCESSFUL","errmsg":""},"responseCode":"OK","result":{"name":"opensaber-registry-api","healthy":true,"checks":[{"name":"opensaber.database","healthy":true,"err":"","errmsg":""}]}}
```
68 changes: 68 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: "2.4"

services:
redis:
image: redis
ports:
- "6379:6379"
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
healthcheck:
test: ["CMD", "curl", "-f", "localhost:9200/_cluster/health"]
interval: 30s
timeout: 10s
retries: 4
db:
image: postgres
# ports:
# - "5432:5432"
environment:
- POSTGRES_DB=registry
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
registry:
image: dockerhub/opensaber-rc
environment:
- connectionInfo_uri=jdbc:postgresql://db:5432/registry
- connectionInfo_username=postgres
- connectionInfo_password=postgres
- elastic_search_connection_url=es:9200
- search_provider=io.opensaber.registry.service.ElasticSearchService
ports:
- "8081:8081"
volumes:
- ./schemas:/home/opensaber/config/public/_schemas
depends_on:
es:
condition: service_healthy
db:
condition: service_started
keycloak:
image: dockerhub/keycloak
environment:
- DB_VENDOR=postgres
- DB_ADDR=db
- DB_PORT=5432
- DB_DATABASE=registry
- DB_USER=postgres
- DB_PASSWORD=postgres
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
healthcheck:
test:
["CMD-SHELL", "curl -f http://localhost:9990/ || exit 1"]
interval: 30s
timeout: 10s
retries: 5
ports:
- "8080:8080"
- "9990:9990"
depends_on:
db:
condition: service_started
20 changes: 20 additions & 0 deletions schemas/BaseAttestationField.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "BaseAttestationField",
"definitions": {
"baseAttestationField": {
"title": "BaseAttestationField",
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "field state (draft, submitted, attested, invalid)"
},
"signature": {
"type": "string",
"description": "digital signature after attestion. Contains attested data, attestorInfo and verification details"
}
}
}
}
}
287 changes: 287 additions & 0 deletions schemas/Common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Common",
"definitions": {
"IdentityDetails": {
"type": "object",
"title": "Identity Details",
"description": "Identity Details",
"required": [],
"properties": {
"fullName": {
"$id": "#/properties/fullName",
"type": "string",
"title": "Full name"
},
"gender": {
"$id": "#/properties/gender",
"type": "string",
"enum": [
"Male",
"Female",
"Other"
],
"title": "Gender"
},
"dob": {
"$id": "#/properties/dob",
"type": "string",
"format": "date",
"title": "DOB"
},
"identityType": {
"$id": "#/properties/identityType",
"type": "string",
"$comment": "Nationality",
"title": "ID Type"
},
"identityValue": {
"$id": "#/properties/identityValue",
"type": "string",
"$comment": "Nationality",
"title": "ID Value"
}
}
},
"ContactDetails": {
"type": "object",
"title": "Contact Details",
"description": "Contact Details",
"required": [],
"properties": {
"email": {
"$id": "#/properties/email",
"type": "string",
"title": "Email"
},
"mobile": {
"$id": "#/properties/mobile",
"type": "string",
"title": "Mobile"
},
"address": {
"$id": "#/properties/address",
"$ref": "#/definitions/Address",
"title": "Address"
}
}
},
"AcademicQualification": {
"type": "object",
"properties": {
"institute": {
"$id": "#/properties/institute",
"type": "string",
"title": "Institute Full Name"
},
"qualification": {
"$id": "#/properties/qualification",
"type": "string",
"title": "Qualification"
},
"program": {
"$id": "#/properties/program",
"type": "string",
"title": "Program of Study"
},
"graduationYear": {
"$id": "#/properties/graduationYear",
"type": "string",
"title": "Year of Graduation"
},
"marks": {
"$id": "#/properties/marks",
"type": "string",
"title": "Marks / Ranking / GPA, etc"
}
}
},
"ExperienceType": {
"type": "object",
"properties": {
"institute": {
"$id": "#/properties/institute",
"type": "string",
"title": "Institute Full Name"
},
"employmentType": {
"$id": "#/properties/employmentType",
"type": "string",
"title": "Employment Type",
"enum": [
"Permanent",
"Contract"
]
},
"start": {
"$id": "#/properties/start",
"type": "string",
"format": "date",
"title": "Start Date"
},
"end": {
"$id": "#/properties/end",
"type": "string",
"format": "date",
"title": "End Date"
},
"teacherType": {
"$id": "#/properties/teacherType",
"type": "string",
"title": "Teacher Type",
"enum": [
"Head teacher",
"Principal",
"VicePrincipal",
"Lecture"
]
},
"subjects": {
"$id": "#/properties/subjects",
"type": "array",
"title": "Subjects teaching at this Institute",
"items": {
"type": "string"
}
},
"grades": {
"$id": "#/properties/grades",
"type": "array",
"title": "Grades Taught (per subject taught)",
"items": {
"type": "string",
"enum": [
"Pre-Pri.",
"Class I",
"Class II",
"Class III",
"Class IV",
"Class V",
"Class VI",
"Class VII",
"Class VIII",
"Class IX",
"Class X",
"Class XI",
"Class XII"
]
}
}
}
},
"EducationType": {
"type": "object",
"properties": {
"institute": {
"$id": "#/properties/institute",
"type": "string",
"title": "Institute Name"
},
"board": {
"$id": "#/properties/board",
"type": "string",
"title": "Board of Education"
},
"medium": {
"$id": "#/properties/program",
"type": "string",
"title": "Medium of Education"
},
"class": {
"$id": "#/properties/graduationYear",
"type": "string",
"enum": [
"Pre-Pri.",
"Class I",
"Class II",
"Class III",
"Class IV",
"Class V",
"Class VI",
"Class VII",
"Class VIII",
"Class IX",
"Class X",
"Class XI",
"Class XII"
],
"title": "Current Enrollment Class / Std."
}
}
},
"GuardianDetails": {
"type": "object",
"properties": {
"fullName": {
"$id": "#/properties/fullName",
"type": "string",
"title": "Full Name"
},
"relation": {
"$id": "#/properties/relation",
"type": "string",
"title": "Relation type"
},
"email": {
"$ref": "#/definitions/ContactDetails/properties/email"
}
}
},
"CertificationType": {
"type": "object",
"properties": {
"institute": {
"type": "string"
},
"start": {
"type": "string",
"format": "date"
},
"end": {
"type": "string",
"format": "date"
}
}
},
"Address": {
"type": "object",
"required": [

],
"properties": {
"plot": {
"type": "string",
"title": "Plot"
},
"street": {
"type": "string",
"title": "Street"
},
"landmark": {
"type": "string",
"title": "Landmark"
},
"locality": {
"type": "string",
"title": "Locality"
},
"state": {
"type": "string",
"title": "State"
},
"district": {
"type": "string",
"title": "District"
},
"village": {
"type": "string",
"title": "Village/Town/City"
},
"pincode": {
"type": "string",
"title": "Pincode"
}
}
}
}
}
Loading