Skip to content

Commit

Permalink
Merge pull request #3 from egovernments/frontend
Browse files Browse the repository at this point in the history
Frontend
  • Loading branch information
shailesh-egov authored Oct 4, 2024
2 parents a703fa3 + 5bee258 commit cc951fd
Show file tree
Hide file tree
Showing 670 changed files with 53,597 additions and 24 deletions.
74 changes: 74 additions & 0 deletions backend/application/docs/ApplicationCreate.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
@startuml
title Submit Application
actor user as "User" order 0 #ddff41
participant APPLICATION as "Application" order 1 #4Ff2AF
participant INDIVIDUAL as "Individual" order 2 #4Ff2AF
participant MDMS as "MDMS" order 3 #4Ff2AF
participant ID_GEN as "ID Generator" order 4 #4Ff2AF
participant WORKFLOW as "Workflow" order 5 #4Ff2AF
participant PERSISTER as "Persister Service" order 6 #4Ff2AF
queue KAFKA as "KAFKA" order 6 #4Ff2AF
database REDIS as "Redis" order 8 #4Ff2AF
database DB as "PostgreSQL" order 8 #4Ff2AF

user -> APPLICATION: Call _create API
activate user #Fafd30
note top: Enter Individual Id,\nProgram code, Document ids
activate APPLICATION #00fff0
APPLICATION -> APPLICATION: Validate request
note right: Vaidate required fields \nto create application
alt if: Request is not valid
user <-[#ff0000]- APPLICATION: [400]: Error response\n with invalid field values
end

group #fffff1 Validate Program Code is valid:
APPLICATION -> MDMS: Call _search API
note right: Get Program Details
activate MDMS #908390
APPLICATION <-- MDMS: Program Details
deactivate MDMS
alt if: Program details not found
user <-[#ff0000]- APPLICATION: [400]: Error response\n with invalid reference error
end
end

group #fffffa Validate Individual is registered:
APPLICATION -> INDIVIDUAL: Call _search API
note right: Get Individual Details
activate INDIVIDUAL #008390
APPLICATION <-- INDIVIDUAL: Individual Details
deactivate INDIVIDUAL
alt if: Individual details not found
user <-[#ff0000]- APPLICATION: [400]: Error response\n with invalid reference error
end
end

APPLICATION -> ID_GEN: call _generate: \nSend module name & number of ids required
activate ID_GEN #F1aF0F
APPLICATION <-- ID_GEN: Return ids
deactivate ID_GEN

APPLICATION -> APPLICATION: Enrich request
note right: Enrich request with \nUUID, audit details

APPLICATION -> WORKFLOW: Call _transition API\nSend business service, ID and current state
activate WORKFLOW #FFf0aF
APPLICATION <-- WORKFLOW: Return response
deactivate WORKFLOW

APPLICATION -> REDIS: Save data in redis by key <b>APPLICATIION_{APPLICAITION.ID}

APPLICATION -> KAFKA: Send request to <b>ubp-application-create</b> topic for persister
APPLICATION -> KAFKA: Send request to <b>ubp-application-verification</b> topic for verification

user <-[#00a00b]- APPLICATION: Success response
note right: Return enriched Application Details
deactivate APPLICATION
deactivate user

KAFKA <- PERSISTER: Listen \n<b>ubp-application-create</b> topic
activate PERSISTER #aFa00b
PERSISTER -> DB: Persist application details in tables\neg_ubp_application\neg_ubp_application_documents
deactivate PERSISTER

@enduml
68 changes: 68 additions & 0 deletions backend/application/docs/ApplicationUpdate.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
@startuml
title Update Application
actor user as "User" order 0 #ddff41
participant APPLICATION as "Application" order 1 #4Ff2AF
participant INDIVIDUAL as "Individual" order 2 #4Ff2AF
participant MDMS as "MDMS" order 3 #4Ff2AF
'participant ID_GEN as "ID Generator" order 4 #4Ff2AF
participant WORKFLOW as "Workflow" order 5 #4Ff2AF
participant PERSISTER as "Persister Service" order 6 #4Ff2AF
queue KAFKA as "KAFKA" order 6 #4Ff2AF
database REDIS as "Redis" order 8 #4Ff2AF
database DB as "PostgreSQL" order 8 #4Ff2AF

user -> APPLICATION: Call _update API
activate user #Fafd30
note top: Enter Individual Id,\nProgram code, Document ids
activate APPLICATION #00fff0
APPLICATION -> APPLICATION: Validate request
note right: Vaidate required fields \nto create bank account
alt if: Request is not valid
user <-[#ff0000]- APPLICATION: [400]: Error response\n with invalid field values
end

group #fffff1 Validate Program Code is valid:
APPLICATION -> MDMS: Call _search API
note right: Get Program Details
activate MDMS #908390
APPLICATION <-- MDMS: Program Details
deactivate MDMS
alt if: Program details not found
user <-[#ff0000]- APPLICATION: [400]: Error response\n with invalid reference error
end
end

group #fffffa Validate Individual is registered:
APPLICATION -> INDIVIDUAL: Call _search API
note right: Get Individual Details
activate INDIVIDUAL #008390
APPLICATION <-- INDIVIDUAL: Individual Details
deactivate INDIVIDUAL
alt if: Individual details not found
user <-[#ff0000]- APPLICATION: [400]: Error response\n with invalid reference error
end
end

APPLICATION -> APPLICATION: Enrich request
note right: Enrich request with \nUUID, audit details

APPLICATION -> WORKFLOW: Call _transition API\nSend business service, ID and current state
activate WORKFLOW #FFf0aF
APPLICATION <-- WORKFLOW: Return response
deactivate WORKFLOW

APPLICATION -> REDIS: Save data in redis by key <b>APPLICATIION_{APPLICAITION.ID}

APPLICATION -> KAFKA: Send request to <b>ubp-application-update</b> topic for persister

user <-[#00a00b]- APPLICATION: Success response
note right: Return updated Application Details
deactivate APPLICATION
deactivate user

KAFKA <- PERSISTER: Listen \n<b>ubp-application-update</b> topic
activate PERSISTER #aFa00b
PERSISTER -> DB: Persist application details in tables\neg_ubp_application\neg_ubp_application_documents
deactivate PERSISTER

@enduml
4 changes: 2 additions & 2 deletions backend/application/src/main/resources/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM egovio/flyway:4.1.2
FROM egovio/flyway:10.7.1

COPY ./migration/main /flyway/sql

COPY migrate.sh /usr/bin/migrate.sh

RUN chmod +x /usr/bin/migrate.sh

CMD ["/usr/bin/migrate.sh"]
ENTRYPOINT ["/usr/bin/migrate.sh"]
2 changes: 1 addition & 1 deletion backend/application/src/main/resources/db/migrate.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS -baselineOnMigrate=true -outOfOrder=true -ignoreMissingMigrations=true migrate
flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS -baselineOnMigrate=true -outOfOrder=true migrate
2 changes: 1 addition & 1 deletion backend/bankaccounts/docs/BankAccountSearch.puml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@startuml
title Update Bank Account
title Search Bank Account
actor user as "User" order 0 #ddff41
participant BANK_ACCOUNT as "Bank Account" order 1 #4Ff2A0
participant ENC_CLIENT as "Encryption Service" order 2 #4Ff2A0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ egov.localization.search.endpoint=/_search
egov.localization.statelevel=true

#mdms urls
egov.mdms.host=https://unified-qa.digit.org
egov.mdms.search.endpoint=/mdms-v2/v1/_search
#egov.mdms.host=https://unified-qa.digit.org
#egov.mdms.search.endpoint=/mdms-v2/v1/_search
egov.mdms.host=http://localhost:8094
egov.mdms.search.endpoint=/egov-mdms-service/v1/_search

#hrms urls
egov.hrms.host=https://unified-qa.digit.org
Expand Down
4 changes: 2 additions & 2 deletions backend/bankaccounts/src/main/resources/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM egovio/flyway:4.1.2
FROM egovio/flyway:10.7.1

COPY ./migration/main /flyway/sql

COPY migrate.sh /usr/bin/migrate.sh

RUN chmod +x /usr/bin/migrate.sh

CMD ["/usr/bin/migrate.sh"]
ENTRYPOINT ["/usr/bin/migrate.sh"]
2 changes: 1 addition & 1 deletion backend/bankaccounts/src/main/resources/db/migrate.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS -baselineOnMigrate=true -outOfOrder=true -ignoreMissingMigrations=true migrate
flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS -baselineOnMigrate=true -outOfOrder=true migrate
4 changes: 2 additions & 2 deletions backend/disbursal/src/main/resources/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM egovio/flyway:4.1.2
FROM egovio/flyway:10.7.1

COPY ./migration/main /flyway/sql

COPY migrate.sh /usr/bin/migrate.sh

RUN chmod +x /usr/bin/migrate.sh

CMD ["/usr/bin/migrate.sh"]
ENTRYPOINT ["/usr/bin/migrate.sh"]
2 changes: 1 addition & 1 deletion backend/disbursal/src/main/resources/db/migrate.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS -baselineOnMigrate=true -outOfOrder=true -ignoreMissingMigrations=true migrate
flyway -url=$DB_URL -table=$SCHEMA_TABLE -user=$FLYWAY_USER -password=$FLYWAY_PASSWORD -locations=$FLYWAY_LOCATIONS -baselineOnMigrate=true -outOfOrder=true migrate
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ public Map<Individual, List<Error>> validate(IndividualBulkRequest request) {
BoundaryResponse.class
);
log.debug("Boundary details fetched successfully for tenantId: {}", tenantId);
// TODO: Remove this after boundary fix
if (true) {
return;
}
// // TODO: Remove this after boundary fix
// if (true) {
// return;
// }
List<String> invalidBoundaryCodes = new ArrayList<>(boundaries);
invalidBoundaryCodes.removeAll(boundarySearchResponse.getBoundary().stream()
.map(Boundary::getCode)
Expand Down
12 changes: 8 additions & 4 deletions backend/individual/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ kafka.producer.config.linger_ms_config=1
kafka.producer.config.buffer_memory_config=33554432

# IDGEN CONFIG
egov.idgen.host=https://unified-qa.digit.org/
#egov.idgen.host=https://unified-qa.digit.org/
egov.idgen.host=http://localhost:8084/
egov.idgen.path=egov-idgen/id/_generate
egov.idgen.integration.enabled=true
idgen.individual.id.format=individual.id

#----------------enc-client config---------------------#
egov.mdms.host=https://unified-qa.digit.org
egov.mdms.search.endpoint=/mdms-v2/v1/_search
#egov.mdms.host=https://unified-qa.digit.org
#egov.mdms.search.endpoint=/mdms-v2/v1/_search
egov.mdms.host=http://localhost:8094
egov.mdms.search.endpoint=/egov-mdms-service/v1/_search

state.level.tenant.id=pg
egov.enc.host=http://localhost:8082
egov.enc.encrypt.endpoint=/egov-enc-service/crypto/v1/_encrypt
Expand Down Expand Up @@ -89,7 +93,7 @@ user.service.user.type=CITIZEN
user.service.account.locked=false

#Notification
notification.sms.enabled=true
notification.sms.enabled=false
kafka.topics.notification.sms=egov.core.notification.sms
notification.sms.disabled.roles=ORG_ADMIN

Expand Down
71 changes: 71 additions & 0 deletions backend/verification/docs/VerificationCreate.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
@startuml
title Verify Application
participant APPLICATION as "Application" order 1 #4Ff2AF
participant VERIFICATION as "Verification" order 2 #4Ff2AF
participant INDIVIDUAL as "Individual" order 2 #4Ff2AF
participant MDMS as "MDMS" order 3 #4Ff2AF
participant WORKFLOW as "Workflow" order 5 #4Ff2AF
participant PERSISTER as "Persister Service" order 6 #4Ff2AF
queue KAFKA as "KAFKA" order 6 #4Ff2AF
database DB as "PostgreSQL" order 8 #4Ff2AF

note top: Enter Individual Id,\nProgram code, Document ids
VERIFICATION <- KAFKA: Listen to <b>ubp-application-verification</b> topic
activate VERIFICATION #00fff0
VERIFICATION -> VERIFICATION: Validate request
note right: Vaidate required fields \nto create bank account
alt if: Request is not valid
user <-[#ff0000]- VERIFICATION: [400]: Error response\n with invalid field values
end

group #fffff1 Validate Program Code is valid:
VERIFICATION -> MDMS: Call _search API
note right: Get Program Details
activate MDMS #908390
VERIFICATION <-- MDMS: Program Details
deactivate MDMS
alt if: Program details not found
user <-[#ff0000]- VERIFICATION: [400]: Error response\n with invalid reference error
end
end

group #fffffa Validate Individual is registered:
APPLICATION -> INDIVIDUAL: Call _search API
note right: Get Individual Details
activate INDIVIDUAL #008390
APPLICATION <-- INDIVIDUAL: Individual Details
deactivate INDIVIDUAL
alt if: Individual details not found
user <-[#ff0000]- APPLICATION: [400]: Error response\n with invalid reference error
end
end

APPLICATION -> ID_GEN: call _generate: \nSend module name & number of ids required
activate ID_GEN #F1aF0F
APPLICATION <-- ID_GEN: Return ids
deactivate ID_GEN

APPLICATION -> APPLICATION: Enrich request
note right: Enrich request with \nUUID, audit details

APPLICATION -> WORKFLOW: Call _transition API\nSend business service, ID and current state
activate WORKFLOW #FFf0aF
APPLICATION <-- WORKFLOW: Return response
deactivate WORKFLOW

APPLICATION -> REDIS: Save data in redis by key <b>APPLICATIION_{APPLICAITION.ID}

APPLICATION -> KAFKA: Send request to <b>ubp-application-create</b> topic for persister
APPLICATION -> KAFKA: Send request to <b>ubp-application-verification</b> topic for verification

user <-[#00a00b]- APPLICATION: Success response
note right: Return enriched Application Details
deactivate APPLICATION
deactivate user

KAFKA <- PERSISTER: Listen \n<b>ubp-application-create</b> topic
activate PERSISTER #aFa00b
PERSISTER -> DB: Persist application details in tables\neg_ubp_application\neg_ubp_application_documents
deactivate PERSISTER

@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ spring.flyway.enabled=false

# KAFKA SERVER CONFIGURATIONS
kafka.config.bootstrap_server_config=localhost:9092
spring.kafka.consumer.value-deserializer=org.egov.tracer.kafka.deserializer.HashMapDeserializer
#spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.properties.spring.deserializer.value.delegate.class=org.springframework.kafka.support.serializer.JsonDeserializer
spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.group-id=verification-service
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
Expand Down
32 changes: 32 additions & 0 deletions frontend/micro-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

.env
.eslintcache

# yarn $
.yarn
yarn.lock
.yarnrc.yml

# dependencies
node_modules
.yarn
/.pnp
.pnp.js

# testing
/coverage

# production
/web/build
dist
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions frontend/micro-ui/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @jagankumar-egov @sathishp-eGov
3 changes: 3 additions & 0 deletions frontend/micro-ui/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
library 'ci-libs'

buildPipeline(configFile: './build/build-config.yml')
Loading

0 comments on commit cc951fd

Please sign in to comment.