Data Hierarchy The portal follows this hierarchy: Entity — Top level (e.g. Welspun Living, Welspun USA, Welspun UK, Welspun Domestic) Department — Under each entity (e.g. HR, IT, Sales, Legal) User — Under each department, created manually by admin (name, email, department, entity) Admin Dashboard Sections The admin has access to the following sections. No other user has dashboard access. 1. Entity & Department & User Management Admin can create, edit, delete entities Admin can create departments and assign them to entities Admin can add users manually, assign them to a department and entity, edit user details, remove users No self-registration — all user creation is done by admin only Login: username-password must also work (as per the current code it is like that only) 2. Template & Document Flow Trigger Admin uploads a DocuSign template and links it to a specific entity and department Admin sets a start date and end date (validity period) for the document (Or can get it from the OCR or docusign) Admin triggers the document flow — either manually at any time or automatically on a schedule On trigger, system sends an email to all users under the selected entity and department Email contains a unique link to the user-facing compliance webpage (As per the current code it should be like that only) 3. Incoming Table Displays all submitted documents with status Pending Admin can view the submitted document and extracted fields Admin can edit basic extracted fields if needed before taking action Admin actions: Approve → document status changes to Valid, document moved to Reports Reject → document status stays Rejected, system automatically sends rejection notification email to the user 4. Reports & Audit (We can add section for it in the sidebar in frontend and show it there) Reporting is based on user and document data: Total documents sent, pending count, completed count, rejected count Department-wise status breakdown View and download final signed or submitted documents per user Export full report for auditor (We can export it to pdf/worddoc) User-Facing Compliance Webpage No login required Accessible only via the unique link sent in the email (Just like current code) Page shows two options: Option A — DocuSign Digital Signature Opens an embedded DocuSign signing flow inside the webpage User signs the document digitally DocuSign webhook captures signed document data and tab field values Extracted fields stored in DB with status Pending Option B — OCR Document Upload User uploads a scanned or physical document from their PC System runs OCR to extract required fields Extracted fields stored in DB with status Pending After either option, the document appears in the admin Incoming Table with status Pending Document Status Flow Admin triggers flow → Email sent to user with unique link → User opens compliance webpage → User chooses Option A (DocuSign) or Option B (OCR upload) → Fields extracted and stored in DB → Status: Pending — appears in Incoming Table → Admin reviews → Approve → Status: Valid → Moved to Reports → Reject → Status: Rejected → Rejection email sent to user Email & Scheduler Three types of emails the system sends: Document flow trigger email — sent when admin triggers a flow, contains unique compliance webpage link for each user Expiry reminder email — auto-sent 1 month before a document's 1-year validity period expires Rejection notification email — sent to the user when their submitted document is rejected by admin All emails use the existing SMTP config from the reseller certificate application. Schedulers run as Celery background jobs. DocuSign Integration Details Auth: JWT with RSA keypair Embedded signing: envelope created server-side, signing URL returned to frontend, opened inside an iframe or redirect on the compliance webpage Templates: created and managed from admin dashboard, linked per entity and department Webhook (DocuSign Connect): configured to receive envelope completion events and capture tab field data Environment: EU production (migrated from demo) Existing Reseller Certificate Application (Reference) This project reuses and maps the following from the existing reseller certificate portal: SMTP email config and email flow patterns DocuSign JWT auth setup and envelope creation patterns Dashboard UI patterns and component structure SQLAlchemy async models and Alembic migration setup (Please remove all the models which are not required) When writing code or making decisions, always check if a similar pattern already exists in the reseller certificate project and reuse it rather than building from scratch. Instructions for LLM Always follow the existing reseller certificate project patterns when writing code for this project Use async SQLAlchemy for all DB operations All background jobs go through Celery Do not hardcode any environment-specific values — use environment variables via Docker Compose When generating API endpoints, follow RESTful conventions and include proper status codes and error handling When generating frontend components, use React with TypeScript and follow the existing component structure If something is not clear from the context above, ask before assuming Write readable and maintainable code If you need any information or have any doubt please do ask me before proceding I will provide you an proper idea about it
Sign in to leave a comment
The SRD will be automatically generated as you discuss your project with the Tech Lead Agent.
No completed page designs yet.
Completed design pages will appear here when they are ready to preview.
No user flows yet.
The User Flow Agent will generate per-persona navigation diagrams after SRD updates.
No completed page designs yet.
Completed design pages will appear here when they are ready to preview.
No user flows yet.
The User Flow Agent will generate per-persona navigation diagrams after SRD updates.
No comments yet. Be the first!