MVP реализации MoexVibe — NestJS бэкенд + React фронтенд + CI/CD #1

Merged
ksv741 merged 21 commits from feat/mvp-implementation into main 2026-06-13 21:07:34 +03:00
Owner

Что сделано

Бэкенд (NestJS)

  • Модульная архитектура: MoexClientModule, CacheModule, SharesModule, BondsModule, SecuritiesModule, CandlesModule, HealthModule
  • MoexClient: rate-limited HTTP клиент (p-queue) + circuit breaker (5 ошибок → 30s)
  • Кеширование: in-memory cache через @nestjs/cache-manager с поуровневым TTL
  • REST API: /api/v1 с глобальным ValidationPipe, TransformInterceptor, HttpExceptionFilter
  • Swagger docs: /api/docs с полной OpenAPI спецификацией
  • Эндпоинты: акции, облигации, свечи (1h/24h), поиск ценных бумаг, health check

Фронтенд (React + Vite)

  • React 18 + react-router-dom v6 + TanStack Query v5
  • lightweight-charts v4 для графиков цен
  • openapi-fetch + codegen типы из Swagger
  • Компоненты: Layout, SearchBar, HomePage, StockPage, BondPage, StockDetails, BondDetails

Инфраструктура

  • Dockerfile'ы для backend (node:20-alpine) и frontend (nginx)
  • docker-compose.yml для локального запуска
  • CI/CD: Gitea Actions pipeline (lint → test → build)
  • ADR документация (7 записей)

Pipeline

push/PR в main → параллельно:
├── lint → npm ci → eslint → prettier --check
├── test → npm ci → vitest run (12 tests)
└── build → npm ci → nest build → tsc -b && vite build

Verification

  • npm run lint — pass
  • npm run test:backend — 12/12 passed
  • npm run build:backend — pass
  • npm run build:frontend — pass
## Что сделано ### Бэкенд (NestJS) - **Модульная архитектура:** MoexClientModule, CacheModule, SharesModule, BondsModule, SecuritiesModule, CandlesModule, HealthModule - **MoexClient:** rate-limited HTTP клиент (p-queue) + circuit breaker (5 ошибок → 30s) - **Кеширование:** in-memory cache через @nestjs/cache-manager с поуровневым TTL - **REST API:** `/api/v1` с глобальным ValidationPipe, TransformInterceptor, HttpExceptionFilter - **Swagger docs:** `/api/docs` с полной OpenAPI спецификацией - **Эндпоинты:** акции, облигации, свечи (1h/24h), поиск ценных бумаг, health check ### Фронтенд (React + Vite) - React 18 + react-router-dom v6 + TanStack Query v5 - `lightweight-charts` v4 для графиков цен - `openapi-fetch` + codegen типы из Swagger - Компоненты: Layout, SearchBar, HomePage, StockPage, BondPage, StockDetails, BondDetails ### Инфраструктура - Dockerfile'ы для backend (node:20-alpine) и frontend (nginx) - docker-compose.yml для локального запуска - **CI/CD:** Gitea Actions pipeline (lint → test → build) - ADR документация (7 записей) ## Pipeline push/PR в main → параллельно: ├── lint → npm ci → eslint → prettier --check ├── test → npm ci → vitest run (12 tests) └── build → npm ci → nest build → tsc -b && vite build ## Verification - [x] `npm run lint` — pass - [x] `npm run test:backend` — 12/12 passed - [x] `npm run build:backend` — pass - [x] `npm run build:frontend` — pass
ksv741 added 19 commits 2026-06-13 20:02:44 +03:00
- Fix RequestLoggingMiddleware this.logger crash by binding the use() method to the instance
- Generate src/api/types.ts from live backend via openapi-typescript
- Add typed API response types and fetch client (responses.ts + client.ts)
- Add useSearch hook with TanStack Query
- Add Layout with header and search bar
- Add SearchBar with debounced search and dropdown
- Implement HomePage, StockPage, BondPage with data loading
- Add useStock, useStockCandles, useStockDividends, useBond, useBondCandles hooks
- Add StockDetails component with full share info
- Add BondDetails component with full bond info (NKD, YTM, duration, coupon)
- Add PriceChart component using lightweight-charts (candlestick chart)
- Update StockPage and BondPage with details, charts, and dividends table
- Docker setup (Dockerfile.backend, Dockerfile.frontend, nginx, docker-compose)
- Architecture overview with Mermaid sequence diagram
- README with quick start and Docker instructions
- Verify OpenAPI spec and ADR docs
ci: add Gitea Actions pipeline with lint, test, build
Some checks failed
CI / lint (pull_request) Failing after 5m47s
CI / test (pull_request) Successful in 9m46s
CI / build (pull_request) Successful in 9m52s
d32ca22acd
ksv741 added 1 commit 2026-06-13 20:39:54 +03:00
style: apply prettier formatting across the codebase
Some checks failed
CI / lint (pull_request) Successful in 9m42s
CI / build (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
b79c8210dc
ksv741 added 1 commit 2026-06-13 21:02:25 +03:00
ci: change ci/cd settings
All checks were successful
CI / lint (pull_request) Successful in 58s
CI / test (pull_request) Successful in 56s
CI / build (pull_request) Successful in 1m5s
CI / lint (push) Successful in 57s
CI / test (push) Successful in 49s
CI / build (push) Successful in 1m1s
a6d4b25afe
ksv741 changed title from MVP реализации MoexVibe — NestJS бэкенд + React фронтенд + CI/C to MVP реализации MoexVibe — NestJS бэкенд + React фронтенд + CI/CD 2026-06-13 21:06:55 +03:00
ksv741 merged commit a6d4b25afe into main 2026-06-13 21:07:34 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: moex/moex-vibe#1
No description provided.