This repository contains a fully-featured AI-powered Web3 website with modern authentication, AI models, smart contracts, and cloud deployment.
Features
Frontend: React.js / Next.js with Tailwind CSS
Backend: FastAPI (Python) & Express.js (Node.js)
Authentication: SAML, OAuth2, JWT
Web3 Integration: Solidity smart contracts, The Graph, Oracles
AI Models: Hugging Face, TensorFlow-Serving, PyTorch
Messaging & Streaming: Kafka with Zookeeper
Database: PostgreSQL, MongoDB, Redis, IPFS
DevOps & Deployment: Docker, Kubernetes, Terraform, CI/CD with GitHub Actions
Monitoring & Logging: Prometheus, Grafana, Loki, ELK Stack
TecX.AI/
βββ frontend/ # React.js / Next.js frontend
β βββ public/ # Static assets (e.g., images, favicon, static HTML files)
β β βββ index.html # Static fallback homepage (for non-Next.js builds)
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ Navbar.js
β β β βββ Footer.js
β β β βββ Button.js
β β βββ pages/ # Next.js pages
β β β βββ index.js # Homepage entry point for Next.js
β β β βββ login.js # Login page
β β β βββ dashboard.js # User dashboard
β β βββ styles/ # Tailwind CSS styles
β β β βββ globals.css
β β β βββ theme.css
β β βββ utils/ # Helper functions
β β β βββ api.js # API calls
β β β βββ format.js # Formatting utilities
β β βββ web3/ # Web3 integrations (MetaMask, WalletConnect, The Graph, Oracles)
β β β βββ provider.js
β β β βββ connectWallet.js
β β βββ hooks/ # Custom React hooks
β β β βββ useAuth.js
β β β βββ useWeb3.js
βββ backend/ # API layer
β βββ fastapi/ # FastAPI microservices
β β βββ main.py
β β βββ routes/
β β β βββ user.py
β β β βββ auth.py
β β βββ models.py
β βββ express/ # Express.js microservices
β β βββ index.js
β β βββ routes/
β β β βββ user.js
β β β βββ auth.js
β βββ authentication/ # SAML, OAuth2, JWT authentication
β β βββ auth.js
β β βββ samlConfig.js
β βββ websocket/ # Real-time WebSocket services
β β βββ server.js
β βββ ai_models/ # AI Model Deployment (Hugging Face, TF-Serving, PyTorch, NLP, Computer Vision)
β β βββ model.py
β β βββ inference.py
β βββ logging/ # Centralized logging (ELK Stack, Loki, Fluentd)
βββ web3/ # Smart contracts and blockchain logic
β βββ contracts/ # Solidity smart contracts
β β βββ Contract.sol
β βββ scripts/ # Deployment and interaction scripts
β β βββ deploy.js
β βββ test/ # Smart contract testing (Slither, Mythril)
β β βββ contract.test.js
β βββ security/ # Security audits and vulnerability scanning
β βββ subgraphs/ # The Graph integration for indexing
βββ database/ # Database and storage
β βββ sql/ # PostgreSQL schemas
β β βββ schema.sql
β βββ nosql/ # MongoDB models
β β βββ userModel.js
β βββ redis/ # Redis caching
β β βββ cache.js
β βββ ipfs/ # IPFS & Arweave storage
βββ devops/ # Deployment and automation
β βββ docker/ # Dockerfiles for containerization
β β βββ Dockerfile
β βββ kubernetes/ # K8s configurations for container orchestration
β β βββ deployment.yaml
β β βββ service.yaml
β βββ terraform/ # Infrastructure as Code (IaC) using Terraform
β β βββ main.tf
β βββ ci-cd/ # GitHub Actions, Jenkins pipelines
β β βββ github-actions.yml
β βββ security/ # Security monitoring and vulnerability scanning
β βββ monitoring/ # Monitoring (Prometheus, Grafana, Loki)
β β βββ prometheus.yaml
β β βββ grafana.yaml
β βββ kafka-zookeeper/ # Kafka message broker and Zookeeper coordination service
β β βββ kafka-config.yaml
β β βββ producer.py
β β βββ consumer.py
β βββ load-balancer/ # Nginx, HAProxy for traffic management
β β βββ nginx.conf
βββ ai-engine/ # AI Pipelines and Training
β βββ models/ # Pretrained AI models and training data
β βββ training/ # Scripts for AI model training and fine-tuning
β β βββ train.py
β βββ inference/ # AI inference API for real-time predictions
β β βββ infer.py
β βββ pipelines/ # Data processing pipelines
β β βββ preprocess.py
β βββ notebooks/ # Jupyter notebooks for research and development
β β βββ model_exploration.ipynb
β βββ requirements.txt # Dependencies for AI model execution
βββ tests/ # Testing
β βββ unit-tests/ # Unit testing for all modules
β βββ integration-tests/ # API and full-system tests
β βββ load-tests/ # Performance and stress testing
β βββ security-tests/ # Security and vulnerability testing
βββ scripts/ # Deployment & automation
β βββ deploy.sh # Automated deployment script
β βββ backup/ # Database backup and restore scripts
βββ docs/ # Documentation
βββ .gitignore # Ignore files
βββ README.md # Project overvie
## π Getting Started
### Prerequisites
- Node.js & npm
- Python 3.x
- Docker & Kubernetes
- MetaMask (for Web3 integration)
- Hardhat (for smart contract deployment)
- PostgreSQL or MongoDB (database setup)
π Setup Instructions
1οΈβ£ Clone the Repository
### Installation
Clone the repository and navigate into the project folder:
```sh
git clone https://github.com/TecExpo/TecX.AI.git
cd TecX.AI
2οΈβ£ Install Dependencies
Frontend (React.js / Next.js)
Navigate to the frontend directory and start the development server:
cd frontend
npm install
npm run devBackend (FastAPI / Express.js)
Navigate to the backend directory and run the servers:
cd backend
pip install -r requirements.txt # FastAPI
# Start FastAPI server
uvicorn fastapi.main:app --reload
# Start Express.js server
npm install # Express.js
node server.js3οΈβ£ Configure Environment Variables
Create a .env file in backend/ and frontend/ with required API keys and settings.
4οΈβ£ Start Services
Using Docker docker-compose up --build
Manually
cd frontend && npm run dev # Start frontend cd backend/fastapi && uvicorn main:app --reload # Start FastAPI cd backend/express && node index.js # Start Express.js
5οΈβ£ Deploy Smart Contracts
Compile and deploy the smart contracts using Hardhat:
cd web3
npx hardhat compile
npx hardhat run scripts/deploy.js --network rinkebyStart the database services using Docker:
docker-compose up -dEnsure you configure your .env file with the correct database credentials.
The repository includes a CI/CD pipeline using GitHub Actions. Push changes to the main branch, and the deployment will be triggered automatically.
- Frontend: React.js, Next.js, Tailwind CSS, Web3.js
- Backend: FastAPI (Python), Express.js (Node.js), WebSockets
- AI: Hugging Face, TensorFlow, PyTorch, NLP, OpenAI APIs
- Web3: Solidity, Hardhat, MetaMask, The Graph, Ethers.js, IPFS, Arweave
- Database: PostgreSQL, MongoDB, Redis, IPFS
- DevOps: Docker, Kubernetes, Terraform, CI/CD(GitHub Actions, Jenkins)
- Authentication: Implements SAML, OAuth2, and JWT-based authentication.
- Smart Contract Audits: Use OpenZeppelin for security best practices.
- Data Encryption: Sensitive data is encrypted using industry standards.
- Environment Variables: Ensure API keys and secrets are stored securely.
We welcome contributions! Please do as following
- Fork the repository and create a new branch(feature).
- Make changes and commit with meaningful messages.
- Submit a pull request for review.
- Follow coding best practices and security guidelines.
This project is licensed under the GNU V3 GPL and, MIT License. See LICENSE for details.
For any inquiries, issues or questions, please open an issue on GitHub or contact the maintainers at support@tecx.ai',or 'adm@tecx.ai.
This Document provides a complete overview of the AI Web3 Website repository, including setup instructions, technology stack, security considerations, and contribution guidelines.