Easy to set up end to end grant application form for DAOs on NEAR Protocol
- Blockchain: NEAR
- Smart Contracts: Sputnik DAO Factory V2, Sputnik DAO V2
- Package manager: NPM
- Application framework: ExpressJS
- Code quality: Eslint, Prettier
- Database: MongoDB
- Docx Templating: docx-templates
- Contract Signature: hellosign
- KYC: KYC DAO
- Invoicing: Node microinvoice
- Scheduling: Calendly
cp .env.dist .env
# 1. set up variables on .env
# 2. update the template in templates/agreement.docx
# 3. replace the logo in `assets`
These special routes should be moved to the admin panel with a better security. They are protected by a secret URL using ADMIN_TOKEN and basic auth using ADMIN_LOGIN and ADMIN_PASSWORD
Use this route to download the invoice
- Route:
/admin/:adminToken/accounts/:nearId/grants/:id/invoices/:invoiceId
adminToken
: ADMIN_TOKEN from the env variable to authorize the requestnearId
: The near account id of the grant userid
: The grant id that can be found in the databaseinvoiceId
: The invoice id (0 for the first payment, 1 for milestone 1, ...)
- Example:
/admin/TdgB349TfjpUnOqQMIIMOQoPf2kU/accounts/sound.testnet/grants/6/invoices/0
This route has been created as a workaround because it seems like the hellosign API doesn't allow to have one signer using the embedded widget and the other using the hello sign website; more info here: NEARFoundation#22 (comment)
- Route:
/admin/:adminToken/accounts/:nearId/grants/:id/agreement/signature
adminToken
: ADMIN_TOKEN from the env variable to authorize the requestnearId
: The near account id of the grant userid
: The grant id that can be found in the database
- Example:
/admin/TdgB349TfjpUnOqQMIIMOQoPf2kU/accounts/sound.testnet/grants/6/agreement/signature
npm install
Set up .env
# run mongodb
npm run dev
Open http://localhost:4000 with your browser to see the result.
npm install
npm start
No tests are implemented yet.