StellarCert - Wave Program Certificate System A decentralized certificate program management system built on the Stellar blockchain using React, NestJS, and Stellar SDK. This system allows for issuing, verifying, and managing digital certificates program credentials in a secure, transparent, and immutable manner.
π Features Core Features Certificate Issuance: Authorized issuers can create digital certificates credentials
Real-time Verification: Anyone can verify the authenticity of certificates using Stellar transactions
Certificate Revocation: Issuers can revoke certificates when needed
Issuer Management: Admin can authorize/remove certificate issuers
Expiry Management: Automatic expiration of certificates based on Stellar sequence numbers
Statistics Dashboard: Track total certificates, active certificates, and issuer activity
Soroban Smart Contract Integration: On-chain certificate operations with multi-signature support
Rate Limiting: IP-based rate limiting on public verification endpoints for security
Technical Features React Frontend: Modern, responsive UI with real-time updates
NestJS Backend: Scalable API with JWT authentication
Soroban Smart Contracts: Decentralized certificate management on Stellar blockchain
Stellar Integration: Smart contract-like functionality using Stellar transactions
Security Features: Rate limiting, authentication, and authorization
QR Code Generation: Easy certificate sharing and verification
PDF Export: Download certificates as PDF documents
ποΈ Project Structure
stellarcert/ βββ frontend/ # React Application β βββ public/ β βββ src/ β β βββ components/ # Reusable components β β β βββ Certificate/ β β β βββ Dashboard/ β β β βββ Issuer/ β β β βββ Shared/ β β βββ contexts/ # React contexts (Auth, Stellar) β β βββ hooks/ # Custom React hooks β β βββ pages/ # Page components β β β βββ Home/ β β β βββ Verify/ β β β βββ Issue/ β β β βββ Dashboard/ β β β βββ Admin/ β β βββ services/ # API and Stellar services β β βββ utils/ # Helper functions β β βββ types/ # TypeScript definitions β β βββ styles/ # CSS/SCSS files β βββ package.json β βββ vite.config.ts # or webpack.config.js β βββ backend/ # NestJS Application β βββ src/ β β βββ modules/ β β β βββ auth/ # Authentication β β β βββ certificate/# Certificate management β β β βββ issuer/ # Issuer management β β β βββ stellar/ # Stellar integration β β β βββ user/ # User management β β βββ common/ β β β βββ guards/ # Auth guards β β β βββ filters/ # Exception filters β β β βββ interceptors/# Interceptors β β β βββ decorators/ # Custom decorators β β βββ config/ # Configuration files β β βββ contracts/ # Smart contract ABIs (if using Soroban) β β βββ database/ # Database models and migrations β β β βββ entities/ β β β βββ migrations/ β β β βββ repositories/ β β βββ utils/ # Utility functions β βββ test/ # Test files β βββ package.json β βββ nest-cli.json β βββ tsconfig.json β βββ stellar-contracts/ # Stellar Soroban Smart Contracts β βββ src/ β β βββ lib.rs # Main certificate contract β β βββ multisig.rs # Multi-signature operations β β βββ crl.rs # Certificate revocation lists β β βββ types.rs # Shared types and data structures β β βββ admin_multisig.rs # Admin multisig functionality β βββ tests/ # Contract tests β βββ Cargo.toml β βββ shared/ # Shared code between frontend/backend β βββ types/ # Shared TypeScript types β βββ constants/ # Shared constants β βββ utils/ # Shared utilities β βββ docker/ # Docker configuration β βββ Dockerfile.frontend β βββ Dockerfile.backend β βββ docker-compose.yml β βββ docs/ # Documentation β βββ api/ # API documentation β βββ stellar/ # Stellar integration docs β βββ deployment/ # Deployment guides β βββ scripts/ # Utility scripts β βββ setup-stellar.js β βββ deploy-contracts.js β βββ seed-database.js β βββ .env.example # Environment variables template βββ .gitignore βββ package.json # Root package.json (workspace) βββ README.md # This file βββ LICENSE βββ docker-compose.yml # Full stack docker compose
π Prerequisites Required Software Node.js (v18 or higher)
npm or yarn or pnpm
Docker & Docker Compose (optional, for containerization)
Stellar CLI Tools (for contract deployment)
PostgreSQL (or Docker for database)
Stellar Requirements Stellar Testnet/Livenet account
Stellar SDK (@stellar/stellar-sdk)
Friendbot (for testnet funding)
π Installation
- Clone the Repository bash git clone https://github.com/Servora/StellarCert.git cd stellarcert
- Setup Backend bash cd backend cp .env.example .env
npm install npm run db:migrate npm run seed 3. Setup Frontend bash cd ../frontend cp .env.example .env npm install 4. Setup Stellar (Optional - for contract deployment) bash cd ../stellar-contracts rustup target add wasm32-unknown-unknown cargo install --locked soroban-cli πββοΈ Running the Application Development Mode Option A: Using Docker Compose (Recommended) bash
docker-compose up --build Option B: Running Separately Backend:
bash cd backend npm run start:dev Frontend:
bash cd frontend npm run dev Production Mode bash
npm run build
npm start π§ͺ Testing Backend Tests bash cd backend npm test # Unit tests npm run test:e2e # E2E tests npm run test:cov # Test coverage Frontend Tests bash cd frontend npm test # Unit tests npm run test:e2e # E2E tests Stellar Contract Tests bash cd stellar-contracts cargo test π§ Configuration Environment Variables Backend (.env):
env
DATABASE_URL=postgresql://user:password@localhost:5432/stellarwave
STELLAR_NETWORK=TESTNET STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org STELLAR_SECRET_KEY=your_secret_key
JWT_SECRET=your_jwt_secret JWT_EXPIRY=24h
PORT=3000 CORS_ORIGIN=http://localhost:5173 Frontend (.env):
env VITE_API_URL=http://localhost:3000/api VITE_STELLAR_NETWORK=TESTNET VITE_HORIZON_URL=https://horizon-testnet.stellar.org π‘ Stellar Integration Key Components Transaction Builder: Creates Stellar transactions for certificate operations
Account Manager: Handles issuer and user accounts
Memo Fields: Uses memo fields to store certificate metadata
Operations:
Issue: Creates trustlines and sends assets
Verify: Checks transaction history
Revoke: Updates account flags
Smart Contract Flow (Soroban) rust // Example Soroban contract function fn issue_certificate( env: Env, issuer: Address, recipient: Address, cert_data: Bytes ) -> Result<(), Error>; π€ Contributing Fork the repository
Create a feature branch (git checkout -b feature/AmazingFeature)
Commit changes (git commit -m 'Add some AmazingFeature')
Push to branch (git push origin feature/AmazingFeature)
Open a Pull Request
π License This project is licensed under the MIT License - see the LICENSE file for details.
π Support For support open an issue in the GitHub repository.