Skip to content

youming-ai/task

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Technical Test: API Integration & Blockchain

This repository contains the full task spec and a completed React + TypeScript implementation.

Contents

Item Description
TASK.md Full requirements and acceptance criteria
frontend/ Implemented app (OpenAPI client, auth flow, blockchain integration)
docs/api-spec.json OpenAPI schema used for API client generation
docs/postman-collection.json Postman collection for manual API endpoint verification

Quick Start

From the project root:

cd frontend
bun install
cp .env.example .env
# Edit .env: VITE_API_BASE_URL / VITE_CHAIN_ID / VITE_CONTRACT_ADDRESS
bun run generate
bun run dev

API Setup & Postman

  • Default API base URL: http://localhost:3000/api
  • Frontend auth uses JWT Bearer token (stored locally and attached to API requests)
  • Import docs/postman-collection.json in Postman and set:
    • baseUrl (API URL)
    • token (from Auth / Login response)
    • userId (for detail/update/delete requests)

You can also use:

cd frontend
bun run dev:mock

to start Prism mock API from docs/api-spec.json.

Blockchain Setup

  • Chain: Sepolia
  • Chain ID: 11155111
  • Contract address: configured with VITE_CONTRACT_ADDRESS
    • Example default in .env.example: 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238

In the app, use /blockchain to connect wallet, read token info/balance, and send transfer transactions.

Validation Commands

cd frontend
bun run test       # unit tests (Vitest)
bun run lint       # lint + format check (Biome)
bun run build      # TypeScript check + production build

For implementation details and design notes, see:

  • frontend/README.md
  • frontend/NOTES.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 96.1%
  • CSS 3.5%
  • HTML 0.4%