Skip to content

msantagiulianab/ClaudePractice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 DeepStack AI Engineering Practice

A multi-language, multi-agent experimental monorepo targeting a 2026 production-grade architecture.

This repository serves as an AI-assisted engineering practice ground β€” combining bleeding-edge frontend tooling, enterprise Java on virtual threads, and Solana blockchain integration β€” all orchestrated through an agentic Cline workspace.


πŸš€ Project Vision

DeepStack is a polyglot monorepo designed to validate and refine an AI-first development workflow. It spans the full modern stack:

  • A Next.js 16 client with React 19 Compiler optimizations and Solana Web3.js wallet integration
  • A Spring Boot 4 backend on Java 25 (LTS) with virtual threads and a Solana Devnet observer
  • PostgreSQL 16 database via Docker, with JPA/Hibernate entity mapping
  • Solana on-chain programs written in Rust/Anchor

The project is structured as a research sandbox for agentic code generation, MCP tooling, and architectural pattern enforcement β€” with strict linting, zero-warning builds, and persona-driven subagents.


πŸ› οΈ 2026 Tech Stack

Layer Technology
Frontend Next.js 16 (App Router) Β· React 19 Β· TypeScript 5.7 Β· Tailwind CSS 4 Β· Turbopack Β· Solana Wallet Adapter
Backend Java 25 (LTS) Β· Spring Boot 4.x Β· Maven Β· Virtual Threads (Project Loom)
Database PostgreSQL 16 (Docker) Β· Spring Data JPA Β· Hibernate 7.x
Blockchain Solana Devnet Β· Web3.js Β· JDK HttpClient RPC client
Contract Solana Β· Rust Β· Anchor
Orchestration Cline (AI agent) Β· MCP (Model Context Protocol) Β· Claude

🎭 Agentic Architecture

The workspace defines specialized subagent personas in .claude/agents/. Each agent is a self-contained persona with domain-specific rules, constraints, and context isolation.

Available Agents

Agent Specialty Boundary
@ui-engineer Next.js 16 + React 19 + Tailwind CSS 4 components + Solana wallet frontend/
@backend-architect Java 25 + Spring Boot 4.x services, JPA repositories, Solana RPC backend/
@solana-expert Rust/Anchor programs, accounts, and instruction handlers solana/

How to Summon

Mention the agent's handle in any prompt:

@ui-engineer Create a data-table component with sorting and pagination.

The system automatically adopts the corresponding persona, strict ruleset, and context boundary β€” preventing cross-contamination between frontend, backend, and Solana concerns.


πŸ“‚ Project Structure

.
β”œβ”€β”€ .clinerules                  # Master project memory & workflow rules
β”œβ”€β”€ .claude/
β”‚   β”œβ”€β”€ agents/                  # Subagent persona definitions
β”‚   β”‚   β”œβ”€β”€ ui-engineer.md
β”‚   β”‚   β”œβ”€β”€ backend-architect.md
β”‚   β”‚   └── solana-expert.md
β”‚   └── skills/                  # Reusable audit/analysis skills
β”‚       └── code-critic.md
β”‚
β”œβ”€β”€ frontend/                    # Next.js 16 App Router client
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                 # Pages, layouts, API routes
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ ui/              # Reusable primitives (Button, etc.)
β”‚   β”‚   β”‚   └── features/        # Domain components (Wallet, Memo, Theme)
β”‚   β”‚   └── lib/                 # Server actions, utilities
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   β”œβ”€β”€ next.config.ts
β”‚   └── tailwind.config.ts
β”‚
β”œβ”€β”€ backend/                     # Java 25 + Spring Boot 4.x
β”‚   β”œβ”€β”€ src/main/java/com/claudepractice/api/
β”‚   β”‚   β”œβ”€β”€ controllers/         # REST API endpoints (Health, Wallets)
β”‚   β”‚   β”œβ”€β”€ services/            # Business logic (RPC, Observers, Registry)
β”‚   β”‚   β”œβ”€β”€ repositories/        # JPA data access layer
β”‚   β”‚   β”œβ”€β”€ model/               # JPA entities (TransactionEntity)
β”‚   β”‚   └── dto/                 # Java record DTOs (HealthResponse, RegisterWalletRequest)
β”‚   └── src/main/resources/      # application.yml, application.properties
β”‚
β”œβ”€β”€ solana/                      # Solana Rust/Anchor programs
β”‚   β”œβ”€β”€ programs/<name>/src/     # Smart contract logic
β”‚   β”œβ”€β”€ tests/                   # TypeScript integration tests
β”‚   └── migrations/              # Deployment scripts
β”‚
β”œβ”€β”€ docker-compose.yml           # PostgreSQL 16 container
β”œβ”€β”€ CLAUDE.md                    # (Per-directory rules files)
β”œβ”€β”€ PROGRESS.md                  # Sprint tracking & milestone log
└── README.md                    # This file

βœ… Current Status

Session 10 β€” Solana-Java-Postgres Bridge β€” Complete πŸŽ‰

  • Infrastructure: Dockerized PostgreSQL 16 with custom roles, auto-provisioned transactions table via Hibernate ddl-auto: update
  • Backend β€” Solana Observer:
    • SolanaRpcClient β€” JDK HttpClient-based RPC client to Solana Devnet using Java 25 virtual threads
    • SolanaObserverService β€” polls registered wallet addresses every 15s, fetches signatures, extracts transaction details, persists to PostgreSQL
    • WalletRegistryService β€” thread-safe ConcurrentHashMap-backed registry for dynamic multi-user wallet observation
  • REST API β€” Dynamic Wallet Registration:
    • POST /api/v1/wallets/active β€” register a wallet address (201 CREATED)
    • DELETE /api/v1/wallets/active β€” unregister a wallet address (200 OK)
    • GET /api/v1/wallets/active β€” list all active wallet addresses
    • No hardcoded wallet addresses β€” purely dynamic, frontend-driven registration
  • Frontend β€” Solana Integration:
    • SolanaWalletProvider with ConnectionProvider, WalletProvider, WalletModalProvider
    • WalletRegistrar β€” auto-registers connected wallet with backend via POST /api/v1/wallets/active
    • SendMemoButton β€” constructs and sends a Solana memo transaction using @solana-program/memo
    • Header β€” wallet connect button with SOL balance display
    • Hydration mismatch fixed via dynamic import with ssr: false
  • Live Verification: Observer detected and saved Devnet transactions to PostgreSQL β€” E2E flow validated

Agentic Documentation Architecture β€” Complete

  • Hybrid AGENTS.md monorepo standard established:
    • AGENTS.md (root) β€” global multi-agent governance, domain boundaries, persona references, summoning protocol
    • frontend/AGENTS.md β€” frontend-only rules (RSC, TypeScript, Tailwind, Shadcn UI, component hierarchy)
    • backend/AGENTS.md β€” backend-only rules (Java 25/Spring Boot 4: strict layering, DTOs as records, virtual threads, SLF4J, API contracts)
  • .clinerules references updated from frontend/AGENTS.md β†’ AGENTS.md (root)
  • Clean separation of concerns: global governance at root, domain-specific rules in sub-project folders

Backend Foundation β€” Complete

  • Java 25 / Spring Boot 4.x backend initialized with Maven wrapper
  • Virtual threads enabled (spring.threads.virtual.enabled=true) for Java 25 Loom
  • Health endpoint at GET /api/v1/health returning {"status":"UP","engine":"Java 25 / Spring Boot 4"}
  • PostgreSQL 16 connected via Spring Data JPA + Hibernate 7.x

Green Build β€” Achieved

Both mvn clean compile (Java) and next build (TypeScript) compile with zero errors.

Sprint Progress

  • Sessions 1–10 β€” βœ… Complete (Bootstrapping through Solana-Java-Postgres Bridge)

πŸš€ Getting Started

Prerequisites

1. Start the Database

docker compose up -d

This starts PostgreSQL 16 on port 5432 with database claudepractice, user claudepractice.

2. Start the Backend (Spring Boot 4)

Open a terminal at the project root:

cd backend
.\mvnw.cmd spring-boot:run

The server starts on http://localhost:8080.

Verify health:

curl http://localhost:8080/api/v1/health
# β†’ {"status":"UP","engine":"Java 25 / Spring Boot 4"}

3. Start the Frontend (Next.js 16)

Open a separate terminal:

cd frontend
npm run dev

The dev server starts on http://localhost:3000 with Turbopack.

4. Connect Your Wallet

  1. Open http://localhost:3000 in your browser
  2. Click "Connect Wallet" in the header
  3. Approve the connection in Phantom (or your Solana wallet)
  4. The frontend automatically registers your wallet with the backend:
    POST /api/v1/wallets/active  { "address": "your_wallet_address" }
    
    You'll see [WALLET-REGISTRAR] βœ… Registered wallet with backend in the browser console.

5. Send a Memo Transaction

  1. Click "Send Memo" button
  2. Approve the transaction in your wallet
  3. Watch the backend terminal for detection:
    [SOLANA-OBSERVER] 🟒 Transaction verified and saved: {signature} (owner=..., amount=... lamports)
    
  4. Verify in the database:
    docker exec claudepractice-db psql -U claudepractice -d claudepractice \
      -c "SELECT * FROM transactions;"

Quick Reference

# Kill stale Java processes (if port 8080 is in use)
Get-Process -Name java | Stop-Process -Force

# Start backend with dynamic wallet registry (no env var needed)
cd backend; .\mvnw.cmd spring-boot:run

# Start frontend
cd frontend; npm run dev

# Query PostgreSQL
docker exec -it claudepractice-db psql -U claudepractice -d claudepractice

# List active wallet addresses being watched
curl http://localhost:8080/api/v1/wallets/active

πŸ“„ License

Private β€” experimental research sandbox for AI-assisted engineering practices.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors