
Complete rewrite from Python/FastAPI to Node.js stack: Features implemented: - User authentication with JWT tokens and role-based access (DEVELOPER/BUYER) - Blockchain wallet linking and management with Ethereum integration - Carbon project creation and management for developers - Marketplace for browsing and purchasing carbon offsets - Transaction tracking with blockchain integration - Comprehensive input validation with Joi - Advanced security with Helmet, CORS, and rate limiting - Error handling and logging middleware - Health check endpoint with service monitoring Technical stack: - Node.js with Express.js and TypeScript - Prisma ORM with SQLite database - Web3.js and Ethers.js for blockchain integration - JWT authentication with bcrypt password hashing - Comprehensive validation and security middleware - Production-ready error handling and logging Database schema: - Users with wallet linking capabilities - Carbon projects with verification status - Carbon offsets with blockchain token tracking - Transactions with confirmation details Environment variables required: - JWT_SECRET (required) - DATABASE_URL (optional, defaults to SQLite) - BLOCKCHAIN_RPC_URL (optional, defaults to localhost) - NODE_ENV, PORT, CORS_ORIGIN (optional) Run with: npm install && npm run db:generate && npm run db:migrate && npm run dev
59 lines
562 B
Plaintext
59 lines
562 B
Plaintext
# Dependencies
|
|
node_modules/
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
|
|
# Production builds
|
|
dist/
|
|
build/
|
|
|
|
# Environment variables
|
|
.env
|
|
.env.local
|
|
.env.production
|
|
.env.test
|
|
|
|
# Database
|
|
storage/
|
|
*.db
|
|
*.sqlite
|
|
|
|
# Logs
|
|
logs/
|
|
*.log
|
|
|
|
# Runtime data
|
|
pids/
|
|
*.pid
|
|
*.seed
|
|
*.pid.lock
|
|
|
|
# Coverage directory used by tools like istanbul
|
|
coverage/
|
|
|
|
# IDE files
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
|
|
# OS generated files
|
|
.DS_Store
|
|
.DS_Store?
|
|
._*
|
|
.Spotlight-V100
|
|
.Trashes
|
|
ehthumbs.db
|
|
Thumbs.db
|
|
|
|
# Temporary files
|
|
tmp/
|
|
temp/
|
|
|
|
# TypeScript
|
|
*.tsbuildinfo
|
|
|
|
# Prisma
|
|
prisma/migrations/ |