Skip to content

Commit f0b780c

Browse files
many changes in the architecture
1 parent 5ca50d0 commit f0b780c

95 files changed

Lines changed: 8216 additions & 406 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
# ===================================
2-
# SupplyChain-Auth Environment Template
3-
# Copy to `.env` and replace placeholder values locally
4-
# ===================================
1+
# Rename this file to .env and replace the placeholder values before running the stack
52

3+
# ===================================
64
# Application Environment
5+
# ===================================
76
NODE_ENV=development
87
REACT_APP_ENV=development
98

10-
# ===================================
11-
# API Configuration
12-
# ===================================
9+
# Frontend API Base URLs (for development)
1310
REACT_APP_API_BASE_URL=http://localhost:8080
1411
REACT_APP_API_PRODUCTS_URL=http://localhost:8080/api/products
1512
REACT_APP_API_VERIFICATION_URL=http://localhost:8080/api/verify
1613
REACT_APP_API_EVENTS_URL=http://localhost:8080/api/events
1714

18-
# Backend Service URLs
15+
# Backend Service URLs (used by frontend or gateway)
1916
PRODUCT_SERVICE_URL=http://localhost:8081
2017
VERIFICATION_SERVICE_URL=http://localhost:8082
2118
EVENT_SERVICE_URL=http://localhost:8083
@@ -25,38 +22,41 @@ EVENT_SERVICE_URL=http://localhost:8083
2522
# ===================================
2623
MONGODB_URI=mongodb://localhost:27017/supplychain_auth
2724
MONGODB_DATABASE=supplychain_auth
28-
MONGODB_USERNAME=<mongo_username>
29-
MONGODB_PASSWORD=<mongo_password>
25+
MONGODB_USERNAME=change_me_mongo_user
26+
MONGODB_PASSWORD=change_me_mongo_password
3027

3128
REDIS_URL=redis://localhost:6379
32-
REDIS_PASSWORD=<redis_password>
29+
# Wrap passwords containing $ or ! in double quotes to avoid Docker variable expansion
30+
REDIS_PASSWORD="change_me_redis_password"
3331

3432
POSTGRES_URL=postgresql://localhost:5432/supplychain_auth
35-
POSTGRES_USERNAME=<postgres_username>
36-
POSTGRES_PASSWORD=<postgres_password>
33+
POSTGRES_DB=supplychain_auth
34+
POSTGRES_USERNAME=change_me_pg_user
35+
POSTGRES_PASSWORD=change_me_pg_password
3736

3837
# ===================================
39-
# Blockchain Configuration (Free Testnet)
38+
# Blockchain Configuration
4039
# ===================================
4140
BLOCKCHAIN_NETWORK=sepolia
42-
ETHEREUM_RPC_URL=https://sepolia.infura.io/v3/<infura_project_id>
43-
PRIVATE_KEY=<private_key_for_testnet>
44-
CONTRACT_ADDRESS=<deployed_contract_address>
41+
ETHEREUM_RPC_URL=https://sepolia.infura.io/v3/<your_project_id>
42+
PRIVATE_KEY=0xYOUR_PRIVATE_KEY
43+
CONTRACT_ADDRESS=0xYourContractAddress
44+
NFT_CONTRACT_ADDRESS=0xYourNftContract # optional, defaults to zero address during deploy
45+
ZK_VERIFIER_ADDRESS=0xYourZkVerifier # optional, defaults to zero address during deploy
4546

4647
# ===================================
4748
# Security Configuration
4849
# ===================================
49-
JWT_SECRET=<generate_strong_jwt_secret>
50+
JWT_SECRET=change_me_jwt_secret
5051
JWT_EXPIRES_IN=24h
5152
JWT_REFRESH_EXPIRES_IN=7d
52-
ENCRYPTION_KEY=<32_byte_hex_key>
53+
ENCRYPTION_KEY=64_char_hex_string_value_here
5354

5455
# ===================================
55-
# External Services (Free Tiers)
56+
# External Services
5657
# ===================================
57-
EMAIL_SERVICE_API_KEY=<mailgun_api_key>
58-
EMAIL_FROM=<noreply@example.com>
59-
58+
EMAIL_SERVICE_API_KEY=your_mail_service_api_key
59+
EMAIL_FROM=noreply@example.com
6060
STORAGE_TYPE=local
6161
STORAGE_PATH=./uploads
6262

@@ -72,21 +72,9 @@ METRICS_PORT=9090
7272
# ===================================
7373
PORT=8080
7474
HOST=localhost
75-
CORS_ORIGINS=http://localhost:3000,https://your-app.vercel.app
75+
CORS_ORIGINS=http://localhost:3000
7676
RATE_LIMIT_WINDOW_MS=900000
7777
RATE_LIMIT_MAX_REQUESTS=100
78-
79-
# ===================================
80-
# Development Settings
81-
# ===================================
8278
DEBUG_MODE=true
8379
ENABLE_SWAGGER=true
8480
CHOKIDAR_USEPOLLING=true
85-
86-
# ===================================
87-
# Production Overrides (set via deployment env)
88-
# ===================================
89-
# REACT_APP_API_BASE_URL=https://your-backend.example.com
90-
# MONGODB_URI=<production_mongodb_connection>
91-
# REDIS_URL=<production_redis_connection>
92-
# JWT_SECRET=<production_jwt_secret>

.gitignore

364 Bytes
Binary file not shown.

README.md

Lines changed: 17 additions & 13 deletions

backend/event-service/target/classes/application.properties

Lines changed: 0 additions & 9 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)