- dfx (DFINITY SDK)
- Node.js 18+
- npm or pnpm
dfx start --backgrounddfx deploydfx generate aseed_backendThis generates declarations in frontend/src/declarations/. Ensure dfx.json has:
"aseed_backend": {
"declarations": {
"output": "frontend/src/declarations"
}
}Create frontend/.env.local:
VITE_CANISTER_ID_ASEED_BACKEND=<canister-id-from-dfx-canister-id-aseed_backend>
DFX_NETWORK=local
DFX_HOST=http://127.0.0.1:4943
Or run dfx canister id aseed_backend and set VITE_CANISTER_ID_ASEED_BACKEND.
cd frontend
npm install
npm run buildFor development with hot reload:
npm run devAfter deploy, log in with your Internet Identity via the app, then call:
dfx canister call aseed_backend assign_role '(principal "<your-ii-principal>")'Or: in the app, call assign_role with your II principal (only works when no admins exist yet; first authenticated caller can add themselves).
Set DFX_NETWORK=ic and use mainnet replica. Update Internet Identity provider in the frontend to https://id.ai.
dfx deploy --network icPoint to mainnet canister IDs and DFX_NETWORK=ic, DFX_HOST=https://mainnet.dfinity.network.
The backend uses transient storage for HashMaps; only stable vars persist across upgrades. Counters (_nextUserId, etc.) persist; users, groups, resources, needs, events, and join requests do not. For production, implement:
system preupgrade– serialize HashMaps to arrays and store in stable varssystem postupgrade– deserialize arrays back into HashMaps
Use the Motoko Array and Iter modules to convert between HashMap and [(K, V)] for each collection.