OmniDoc is a Document Management System, written in Go and automatically deployed on AWS, using:
- AWS API Gateway
- AWS Lambda
- AWS S3
- RDS (PostgreSQL)
- AWS Serverless Application Model (SAM)
You can add a document to DMS in two steps:
- Get an asset pre-signed upload URL
- Upload a file to the pre-signed URL
POST /
{
"obj_type": "app",
"obj_id": 402,
"type": "Loan Agreement",
"attrs": {
"key1": "value1",
"key2": "value2"
},
"filename": "Meeting Mania.xlsx"
}
Name | Type | Description |
---|---|---|
obj_type | string | Object Type for which the document is being stored - app or user |
obj_id | int | Object ID for which the document is being stored. |
type | string | Type of the document being stored. Valid types: Loan Agreement CAF SOC NOC Welcome Letter Foreclosure Letter SOA RPS Delivery Order Insurance Form Vehicle Registration Certificate Undertaking Docket FI Report FCU Report Property NACH PDC DRD Passport PAN Aadhaar Driving License Voter ID Card NREGA Job Card Utility Bill Bank Statement Rent Agreement Experian Bureau Report CIBIL Bureau Report CRIF Bureau Report Equifax Bureau Report CKYC XML OKYC XML Aadhaar Front Aadhaar Back Driving License Front Driving License Back Voter ID Card Front Voter ID Card Back Passport Front Passport Back Photo Address Proof Constitution of Entity Commercial Cibil Bureau Report PD Questionnaire Student Data CA Certificate Audit Report Valuation Report Legal Report Financial Statement Analysis Report Application Form GST KYC Docket CMA Data/Projections Udyam Certificate Ownership Proof Existing Lan Documents Sanction letter |
filename | string | Filename of the document to be stored. |
attrs | JSON | Any metadata to be stored with the document. |
{
"url": "<SIGNED_URL>",
"expires_at": "2020-04-28T03:29:26.882234986Z"
}
Name | Type | Description |
---|---|---|
url | string | Presigned URL for uploading the file |
expires_at | string | Time at which the the presigned URL expires. |
PUT <SIGNED_URL>
You can rertrieve all documents from DMS for:
- Application
- User
- Application and Type
- User and Type
- GET /?o=app&id=402
- GET /?o=app&id=402&t=Loan Agreement
- GET /?o=app&id=402&t=Loan Agreement&e=1440
Name | Type | Description |
---|---|---|
o | string | Object Type for which the documents are to be retrieved |
id | int | Object ID for which the documents are to be retrieved |
t | string | Type of document to be retrieved |
e | int | Expiry for the link in minutes (Default: 10 minutes) |
[
[
{
"asset": {
"obj_type": "app",
"obj_id": 121,
"filename": "/app/121/loanagreement.pdf",
"type": "Loan Agreement",
"attrs": {
"key1": "value1"
},
"created_at": "2020-05-23T19:12:19.308369Z",
"updated_at": "2020-05-23T19:12:19.308369Z"
},
"signed_url": {
"url": "<SIGNED_URL",
"expires_at": "2020-05-24T04:42:31.6585508Z"
}
},
]
Fork, fix, then send me a pull request..
MIT