How saumyadhorje/artblock-defi-control works
ArtBlock is a role-based digital art gallery and investment platform. Artists and curators use the React app to manage artwork and galleries; artists can upload artwork to IPFS and mint NFTs through a wallet, while gallery and NFT records are also persisted in MongoDB. Investors can track portfolios and purchase artwork, and curators can create galleries and claim revenue. The README also describes gallery applications, curation, and analytics. Some UI and route implementations were not sampled, so uncertain links are omitted.
Main entry points: App.js React app · investorController.js Investor operations · useNFTContract.js NFT contract hook · galleryController.js Gallery operations
Components 27
Web experience
- React app
frontend/src/App.js - Role dashboards
frontend/src/pages
Identity and roles
- Auth UI
frontend/src/pages/Auth.js - Auth context
frontend/src/context/AuthContext.js - Auth routes
backend/routes/authRoutes.js - Auth service
backend/services/authService.js
Gallery curation
- Gallery views
frontend/src/pages/gallery - Gallery routes
backend/routes/gallery.routes.js - Gallery operations
backend/controllers/galleryController.js - Gallery records
backend/models/Gallery.js - Curator records
backend/models/Curator.js - Gallery contracts
backend/services/contractService.js
Artwork and NFTs
- NFT contract hook
frontend/src/hooks/useNFTContract.js - IPFS uploads
frontend/src/utils/ipfs.js - NFT routes
backend/routes/nft.routes.js - NFT records
backend/models/nft.model.js
Investment
- Investor routes
backend/routes/investorRoutes.js - Investor operations
backend/controllers/investorController.js - Investor records
backend/models/Investor.js - Transactions
backend/models/Transaction.js
Other components
- Artist
- Gallery curator
- Art collector
- Wallet
- IPFS
- Blockchain
- MongoDB
Connections 29
- Artist → React app: uses
- Gallery curator → React app: uses
- Art collector → React app: uses
- React app → Auth context: wraps
- React app → Auth UI: routes to
- React app → Role dashboards: routes to
- React app → Gallery views: routes to
- Auth UI → Auth context: uses
- Auth context → Auth routes: API requests
- Auth routes → Auth service: delegates
- Auth service → MongoDB: reads/writes
- Gallery views → Gallery routes: API requests
- Gallery routes → Gallery operations: calls
- Gallery operations → Curator records: reads
- Gallery operations → Gallery records: reads/writes
- Gallery operations → Gallery contracts: calls
- Gallery contracts → Blockchain: gallery transactions
- NFT contract hook → IPFS uploads: uploads
- IPFS uploads → IPFS: stores content
- NFT contract hook → Wallet: signs mint
- NFT contract hook → Blockchain: mints NFT
- NFT contract hook → NFT routes: stores NFT
- NFT routes → NFT records: reads/writes
- NFT routes → Gallery records: updates submissions
- Investor routes → Investor operations: calls
- Investor operations → Investor records: reads/writes
- Investor operations → NFT records: looks up
- Investor operations → Transactions: records sales
- Investor operations → Gallery records: updates stats