A full-stack Blockchain Explorer and Analytics Platform built with React, Node.js, Express, and PostgreSQL. The platform provides wallet management, market and P2P trading, token conversions, transaction tracking, and a simulated blockchain explorer.
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Environment Variables
- Database Setup
- Running the Application
- API Endpoints
- License
- Blockchain explorer with block and transaction details
- Wallet management with balance tracking and token holdings
- Market trading with trading pairs, price history, and order books
- Peer-to-peer trading with order creation and transaction management
- Token conversion and swap functionality
- User registration and authentication with email verification
- Email notifications for transactions and account activity
- Search functionality for wallets and transactions
- Real-time analytics and statistics
Frontend
- React 19
- TypeScript
- Vite 8
- Tailwind CSS
Backend
- Node.js
- Express 5
- PostgreSQL
- Nodemailer
Development Tools
- Nodemon
- Concurrently
- ESLint
Nexus-Blockchain-Core/
|-- backend/
| |-- src/
| | |-- config/
| | | |-- ConnectDB.js
| | |-- controllers/
| | | |-- blockController.js
| | | |-- conversionController.js
| | | |-- emailController.js
| | | |-- marketController.js
| | | |-- p2pController.js
| | | |-- searchController.js
| | | |-- tokenController.js
| | | |-- transactionController.js
| | | |-- userController.js
| | | |-- walletController.js
| | |-- middleware/
| | | |-- errorHandler.js
| | |-- routes/
| | |-- utils/
| | | |-- asyncHandler.js
| | | |-- emailService.js
| | |-- app.js
| | |-- server.js
| |-- database-schema.sql
| |-- package.json
|-- Frontend/
| |-- src/
| | |-- app/
| | |-- assets/
| | |-- components/
| | |-- lib/
| | |-- store/
| | |-- types/
| | |-- App.tsx
| | |-- main.tsx
| |-- public/
| |-- index.html
| |-- package.json
| |-- vite.config.ts
| |-- tsconfig.json
|-- package.json
|-- LICENSE
|-- README.md
- Node.js version 18 or higher
- PostgreSQL version 14 or higher
- npm or yarn package manager
- Clone the repository
git clone https://github.com/EbadAhmed1/Nexus-Blockchain-Core.git
cd Nexus-Blockchain-Core- Install all dependencies (root, backend, and frontend)
npm run install:allOr install them individually
npm install
cd backend && npm install
cd ../Frontend && npm installCreate a .env file inside the backend/ directory with the following variables:
PG_HOST=localhost
PG_PORT=5432
PG_USER=postgres
PG_PASSWORD=your_password_here
PG_DATABASE=blockscan
PORT=5000
Optional email configuration:
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=your_email
SMTP_PASS=your_password
EMAIL_FROM=noreply@example.com
FRONTEND_URL=http://localhost:5173
- Create the database in PostgreSQL
CREATE DATABASE blockscan;- Run the schema file to create tables, views, functions, and triggers
psql -U postgres -d blockscan -f backend/database-schema.sqlOr if using a migration file:
psql -U postgres -d blockscan -f backend/create-blockscan-database.sqlRun both frontend and backend together from the project root:
npm run devThis starts the backend on http://localhost:5000 and the frontend on http://localhost:5173.
To run them separately:
# Backend only
cd backend
npm run dev
# Frontend only
cd Frontend
npm run devTo build the frontend for production:
npm run build| Resource | Base Path | Description |
|---|---|---|
| Users | /api/users | Registration, login, profile management |
| Wallets | /api/wallets | Wallet creation, balances, transfers |
| Blocks | /api/blocks | Block listing and details |
| Transactions | /api/transactions | Transaction creation and history |
| Tokens | /api/tokens | Token listing, details, and holders |
| Market | /api/market | Trading pairs, price history, order book |
| P2P | /api/p2p | Peer-to-peer order and trade management |
| Conversion | /api/conversion | Token swap and conversion rates |
| Search | /api/search | Search wallets and transactions |
| /api/email | Notifications and verification |
This project is licensed under the MIT License. See the LICENSE file for details.