diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml deleted file mode 100644 index a0c5641..0000000 --- a/.github/workflows/security.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Security - -on: - pull_request: - push: - branches: - - main - -permissions: - contents: read - security-events: write - -jobs: - dependency-review: - name: Dependency Review - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Review Dependencies - uses: actions/dependency-review-action@v4 diff --git a/apps/web/bun.lock b/apps/web/bun.lock index d9c8eee..ad37c23 100644 --- a/apps/web/bun.lock +++ b/apps/web/bun.lock @@ -61,7 +61,7 @@ "@emnapi/core": ["@emnapi/core@1.10.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw=="], - "@emnapi/runtime": ["@emnapi/runtime@1.10.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA=="], + "@emnapi/runtime": ["@emnapi/runtime@1.11.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-55coeOFKHv1ywEcUXJtWU5f+Jr/W5tZDvZig8DLKSwUN1JpROQ4rk/SNOQiFWmaR/VKF4zuFyW1B8JduOSv6Pg=="], "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="], @@ -859,11 +859,11 @@ "@eslint/eslintrc/globals": ["globals@14.0.0", "", {}, "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ=="], - "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.10.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" }, "bundled": true }, "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw=="], + "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" }, "bundled": true }, "sha512-l9Oo58x0HOP5znGzVhYW9U3e5wVuA4LAZU2AGezTmkhO1CgQRFDhDg4nneHsu/t3WniXg9QrG2nIXL/ZS8ln8Q=="], - "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.10.0", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA=="], + "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.11.0", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-55coeOFKHv1ywEcUXJtWU5f+Jr/W5tZDvZig8DLKSwUN1JpROQ4rk/SNOQiFWmaR/VKF4zuFyW1B8JduOSv6Pg=="], - "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="], + "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.2", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA=="], "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.4", "", { "dependencies": { "@tybys/wasm-util": "^0.10.1" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" }, "bundled": true }, "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow=="], @@ -879,6 +879,8 @@ "@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="], + "@unrs/resolver-binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.10.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA=="], + "eslint-import-resolver-node/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], "eslint-module-utils/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 0000000..b95cfb9 --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,213 @@ +# Architecture + +## Overview + +FrilChain is a Web3 platform designed to explore, collect, analyze, and deliver blockchain data. + +The system is intentionally separated into multiple services so that each component can focus on a single responsibility. + +--- + +## Architecture Goals + +- Clear separation of concerns +- Independent service development +- Event-driven communication +- Scalable blockchain indexing +- Real-time data delivery + +--- + +## High-Level Architecture + +```text +Browser + │ + ▼ +Next.js + │ + REST API + │ + ▼ +Spring Boot + │ + ├──────── PostgreSQL + │ + ├──────── Redis Pub/Sub + │ + └──────── Rust Service + │ + JSON-RPC + │ + ▼ + Blockchain Node +``` + +--- + +## Service Responsibilities + +### Web + +Location: + +```text +apps/web +``` + +Responsibilities: + +- User Interface +- Wallet Explorer +- Portfolio View +- Real-Time Dashboard + +Technology: + +- Next.js +- TypeScript +- Bun + +--- + +### API + +Location: + +```text +apps/api +``` + +Responsibilities: + +- Authentication +- Authorization +- Watchlist Management +- Portfolio APIs +- Event Distribution + +Technology: + +- Spring Boot +- Spring Security +- OAuth2 +- JWT + +--- + +### Indexer + +Location: + +```text +apps/indexer +``` + +Responsibilities: + +- Blockchain Communication +- JSON-RPC Requests +- Event Collection +- Indexing Pipeline + +Technology: + +- Rust + +--- + +## Communication + +### REST API + +Used between: + +```text +Web +↓ +API +``` + +--- + +### JSON-RPC + +Used between: + +```text +Indexer +↓ +Blockchain Node +``` + +--- + +### WebSocket + +Used between: + +```text +API +↓ +Browser +``` + +--- + +### Redis Pub/Sub + +Used between: + +```text +Indexer +↓ +API +``` + +--- + +### Kafka + +Planned for large-scale event processing. + +```text +Indexer +↓ +Kafka +↓ +Consumers +``` + +--- + +## Database Strategy + +Initial stages: + +- users +- oauth_accounts +- watchlists + +Blockchain data will not be fully stored during the early phases. + +The project starts as a wallet explorer and gradually evolves into a blockchain data platform. + +--- + +## Future Direction + +Phase 1: + +Wallet Explorer + +Phase 2: + +Portfolio Platform + +Phase 3: + +Real-Time Platform + +Phase 4: + +Blockchain Data Platform diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md new file mode 100644 index 0000000..e823825 --- /dev/null +++ b/docs/ROADMAP.md @@ -0,0 +1,129 @@ +# Roadmap + +## Vision + +Build a lightweight wallet explorer and portfolio platform that evolves into a blockchain data platform. + +--- + +## Phase 1 - Wallet Explorer + +Goal: + +Allow users to explore wallet information directly from the blockchain. + +Features: + +- Wallet balance lookup +- ERC20 token lookup +- Transaction history lookup +- OAuth login +- Watchlist management + +Technologies: + +- REST API +- JSON-RPC +- PostgreSQL + +Status: + +🚧 Planned + +--- + +## Phase 2 - Portfolio Platform + +Goal: + +Provide portfolio management features. + +Features: + +- Portfolio summary +- Token holdings +- Wallet statistics +- Cached blockchain data + +Technologies: + +- REST API +- PostgreSQL +- Redis + +Status: + +📝 Planned + +--- + +## Phase 3 - Real-Time Platform + +Goal: + +Deliver blockchain events in real time. + +Features: + +- Transaction notifications +- Watchlist monitoring +- Event streaming + +Technologies: + +- WebSocket +- SSE +- Redis Pub/Sub + +Status: + +📝 Planned + +--- + +## Phase 4 - Selective Indexing + +Goal: + +Track only user-selected wallets. + +Features: + +- Wallet tracking +- Event storage +- Historical analysis + +Technologies: + +- Rust Indexer +- PostgreSQL +- Redis + +Status: + +📝 Planned + +--- + +## Phase 5 - Blockchain Data Platform + +Goal: + +Build a scalable event-driven blockchain platform. + +Features: + +- Event indexing +- Analytics +- Statistics APIs +- Multi-chain support + +Technologies: + +- Kafka +- Event Driven Architecture +- Distributed Processing + +Status: + +💡 Future