backend + step.md

This commit is contained in:
5t4l1n
2025-07-25 11:30:25 +05:30
parent a954c23a0c
commit 868336188a
2 changed files with 51 additions and 1 deletions
+50 -1
View File
@@ -52,4 +52,53 @@ Or to fork Ethereum mainnet (for testing with real contract data):
anvil --fork-url https://eth.merkle.io
```
## Completed:)
## Step 1 Completed:)
# Step 2 Backend
OpenLearnX Quick Start Commands
## Terminal 1: Start Anvil Blockchain
```
anvil --fork-url https://eth.merkle.io
```
Keep this terminal running
## Terminal 2: Deploy Smart Contract
```
cd backend
source venv/bin/activate
python3 scripts/deploy.py
```
Copy the contract address to your .env file, then you can close this terminal
## Terminal 3: Start Flask Application
```
cd backend
source venv/bin/activate
python3 main.py
```
Keep this terminal running
## Test Your Platform
```
# Test API health
curl http://127.0.0.1:5000/
# Test authentication endpoint
curl -X POST http://127.0.0.1:5000/api/auth/nonce \
-H "Content-Type: application/json" \
-d '{"wallet_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"}'
```
Your OpenLearnX Platform URLs
```
API: http://127.0.0.1:5000
Network Access: http://192.168.35.250:5000
```
## Step 2 Completed:)