Skip to content

Repository files navigation

StellarVault πŸš€

A production-ready Web3 application built on the Stellar ecosystem featuring smart contracts, a robust API backend, and a modern web interface.

Organization: NovaCore Labs
Repository: NovaCoreLabs1/StellarVault
Status: Active Development


πŸ“‹ Quick Start

Prerequisites

  • Node.js 18+ and npm 9+
  • Docker & Docker Compose (for containerized development)
  • Rust & Cargo (for smart contracts)
  • Soroban CLI (for contract deployment)

Installation

# Clone the repository
git clone https://github.com/NovaCoreLabs1/StellarVault.git
cd StellarVault

# Install dependencies
npm install

# Setup environment variables
cp .env.example .env
# Edit .env with your values

# Start development environment
docker-compose up

# In another terminal, run dev server
npm run dev

# Frontend: http://localhost:3000
# Backend API: http://localhost:3001

Development Commands

# Install dependencies
npm install

# Development mode (watch all packages)
npm run dev

# Build all packages
npm run build

# Run tests
npm run test

# Run tests with coverage
npm run test:coverage

# Run E2E tests
npm run test:e2e

# Linting
npm run lint
npm run lint:fix

# Code formatting
npm run format
npm run format:check

# Type checking
npm run type-check

# Clean build artifacts
npm run clean

πŸ“ Project Structure

StellarVault/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ frontend/          # Next.js web application
β”‚   β”œβ”€β”€ backend/           # NestJS API server
β”‚   └── contracts/         # Soroban smart contracts (Rust)
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ ui/                # Shared React components
β”‚   β”œβ”€β”€ config/            # Shared configurations
β”‚   β”œβ”€β”€ types/             # Shared TypeScript types
β”‚   └── utils/             # Shared utilities
β”œβ”€β”€ infra/
β”‚   β”œβ”€β”€ docker/            # Dockerfile configurations
β”‚   β”œβ”€β”€ ci/                # GitHub Actions workflows
β”‚   └── scripts/           # Automation scripts
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ architecture.md    # Architecture overview
β”‚   β”œβ”€β”€ api-spec.md        # API documentation
β”‚   └── smart-contracts.md # Smart contract specs
β”œβ”€β”€ .github/
β”‚   └── workflows/         # CI/CD pipelines
β”œβ”€β”€ docker-compose.yml     # Development environment
β”œβ”€β”€ turbo.json             # Turborepo configuration
└── .env.example           # Environment variable template

πŸ—οΈ Architecture

Technology Stack

Frontend:

  • Next.js 14
  • React 18
  • TypeScript
  • Zustand (State Management)
  • Axios (HTTP Client)
  • Stellar JS SDK

Backend:

  • NestJS
  • Express
  • PostgreSQL
  • Redis
  • TypeORM
  • JWT Authentication

Smart Contracts:

  • Rust
  • Soroban SDK
  • Stellar Network

DevOps:

  • Turborepo (Monorepo)
  • Docker & Docker Compose
  • GitHub Actions
  • ESLint & Prettier
  • TypeScript

Architecture Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Frontend (Next.js - Port 3000)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚ HTTP/REST
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Backend API (NestJS - Port 3001)       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Auth | Wallet  β”‚ Transaction | Contract        β”‚
β”‚ User | Asset   β”‚ Notification | Queue          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                β”‚
    β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”
    β”‚PostgreSQLβ”‚      β”‚  Redis  β”‚
    β”‚ Database β”‚      β”‚  Cache  β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

         Stellar Blockchain / Soroban
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ Smart Contracts (Rust - Soroban)    β”‚
    β”‚ β”œβ”€ VaultContract                    β”‚
    β”‚ β”œβ”€ TokenContract                    β”‚
    β”‚ └─ PaymentContract                  β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For detailed architecture, see docs/architecture.md.


πŸ”Œ API Documentation

The backend provides RESTful APIs for:

  • Authentication: User registration, login, token refresh
  • Wallet Management: Add, manage, and track wallets
  • Assets: Track and manage digital assets
  • Transactions: Send, receive, and track transactions
  • Smart Contracts: Invoke and monitor contract interactions
  • Notifications: Real-time user notifications
  • Webhooks: Event-driven integrations

Full API documentation: docs/api-spec.md


⛓️ Smart Contracts

The application uses three main smart contracts:

  1. VaultContract: Core vault functionality (deposits, withdrawals, balance tracking)
  2. TokenContract: Custom token management (mint, burn, transfer, approve)
  3. PaymentContract: Payment processing and payment channels

For detailed contract specifications: docs/smart-contracts.md


πŸ§ͺ Testing

Unit Tests

npm run test

Test with Coverage

npm run test:coverage

E2E Tests

npm run test:e2e

Test files are located alongside source files as *.test.ts or *.spec.ts.


πŸš€ Deployment

Development

docker-compose up
npm run dev

Production Build

npm run build
npm run start --filter=@stellar-vault/frontend
npm run start --filter=@stellar-vault/backend

Docker Deployment

docker-compose -f docker-compose.yml up -d

Kubernetes (Coming Soon)

  • Helm charts for Kubernetes deployment
  • Scalable infrastructure
  • Auto-scaling and load balancing

πŸ” Security

  • JWT-based authentication
  • CORS protection
  • Rate limiting on API endpoints
  • Environment variable isolation
  • Smart contract audited for security
  • Password hashing with bcrypt
  • Input validation and sanitization

πŸ“Š Monitoring & Observability

  • Error Tracking: Sentry integration (optional)
  • Application Metrics: Performance monitoring
  • Database Monitoring: Query performance tracking
  • Health Checks: /health endpoint on backend
  • Logging: Structured logging with levels (debug, info, warn, error)

🀝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Test your changes (npm run test)
  5. Follow code style (npm run format && npm run lint)
  6. Commit with clear messages
  7. Push to your branch
  8. Open a Pull Request

Code Standards

  • Linting: ESLint configuration enforced
  • Formatting: Prettier for consistent code style
  • Type Safety: Strict TypeScript configuration
  • Testing: Maintain 80%+ code coverage
  • Documentation: Update docs for new features

See GitHub Issues for tasks and features to work on.


πŸ“š Documentation


πŸ› Issue Tracking

Track and contribute to development:


πŸ“ž Support & Community

  • Discussions: GitHub Discussions for questions and ideas
  • Issues: Report bugs and request features via GitHub Issues
  • Documentation: Check docs/ for detailed information
  • Email: support@stellarvault.io

πŸ“„ License

This project is licensed under the MIT License - see LICENSE file for details.


πŸ™ Acknowledgments

  • Stellar Development Foundation
  • Soroban Smart Contract Platform
  • NestJS Community
  • Next.js Community
  • All contributors and supporters

πŸ—ΊοΈ Roadmap

Phase 1: MVP (Current)

  • βœ… Project setup and monorepo configuration
  • βœ… Core smart contracts
  • ⏳ Basic wallet integration
  • ⏳ Transaction management
  • ⏳ Simple UI interface

Phase 2: Enhancement

  • Advanced wallet features
  • Multi-signature wallets
  • DeFi integrations
  • Enhanced UI/UX
  • Mobile app

Phase 3: Scale

  • Payment gateway integration
  • Advanced analytics
  • API marketplace
  • SDK distribution
  • Enterprise features

Built with ❀️ by NovaCore Labs

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages