-
Notifications
You must be signed in to change notification settings - Fork 0
Finish the First big version(MVP), ready to deploy #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ror catch and fresh button
update: enable PR checks for all branch
finish big num display #9
…rom CurrencySidebar
feat(sidebar): introduce validated currency input, improve accessibility, and add tests and docs
…d-docs Finish updating Testing Infrastructure & Configuration& Docs for MVP 1
Finish updating README for the project, finish setting docker for the project
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request transforms a Next.js starter template into a full-featured currency converter application with comprehensive testing infrastructure, Docker support, and production-ready configuration.
- Implements currency conversion functionality using Open Exchange Rates API with AUD as base currency
- Sets up Vitest testing infrastructure with separate unit and integration test projects
- Adds Docker development and production deployment configurations
- Integrates shadcn/ui component library with theme support
Reviewed Changes
Copilot reviewed 36 out of 38 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.mts | Configures Vitest with separate unit/integration projects and coverage reporting |
| tsconfig.json | Excludes .history directory from TypeScript compilation |
| setup.env.ts | Loads .env.test file for test environment configuration |
| package.json | Adds UI component libraries, testing scripts, and dotenv dependency |
| next.config.ts | Enables standalone output mode for Docker deployment |
| lib/utils.ts | Utility function combining clsx and tailwind-merge for className handling |
| lib/server/oxr_convert.ts | Server-side logic for converting USD-based rates to AUD-based rates |
| lib/server/oxr.ts | Client module for fetching exchange rates from Open Exchange Rates API |
| lib/server/tests/*.test.ts | Unit tests for currency conversion logic with mocked dependencies |
| lib/server/tests/oxr.integration.test.ts | Integration test hitting real OXR API with retry logic |
| components/ui/* | shadcn/ui components (Button, Card, Chart, Input, Label, Skeleton) |
| components/sidebar/* | Currency converter UI components with tests |
| components/theme-provider.tsx | Wraps next-themes for light/dark mode support |
| app/page.tsx | Main page displaying currency converter interface |
| app/layout.tsx | Root layout with theme provider and font configuration |
| app/globals.css | Design system CSS variables and Tailwind configuration |
| app/api/rates/latest/route.ts | API route returning AUD-based exchange rates |
| Dockerfile | Multi-stage Docker build with dev, builder, and runner stages |
| compose.*.yml | Docker Compose configurations for dev and production environments |
| .dockerignore | Excludes development files from Docker context |
| eslint.config.mjs | Adds .history and coverage to ESLint ignore patterns |
| .github/workflows/cicd.yml | Updates CI workflow to run integration tests when credentials available |
| README.md | Comprehensive documentation for setup, development, testing, and deployment |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| base: "USD", | ||
| rates: { AUD: 1.0 }, | ||
| }), | ||
| } as unknown as Response); // 这里返回值“长得像”Response |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment contains Chinese text '这里返回值"长得像"Response' which should be translated to English for consistency with the rest of the codebase. Suggested translation: 'Type assertion to Response for mock compatibility'.
| } as unknown as Response); // 这里返回值“长得像”Response | |
| } as unknown as Response); // Type assertion to Response for mock compatibility |
| .vscode | ||
| .idea | ||
|
|
||
| # Env files (改为在运行容器时注入) |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment contains Chinese text '改为在运行容器时注入' which should be translated to English for consistency. Suggested translation: 'Inject at container runtime instead'.
| # Env files (改为在运行容器时注入) | |
| # Env files (Inject at container runtime instead) |
This pull request introduces the initial implementation of a currency converter web application, focusing on core features, UI structure, Dockerization, and development tooling. The most significant changes include the creation of a multi-stage Docker setup, the main page layout, reusable UI components for currency input and display, and improved development/testing documentation. Below are the most important changes grouped by theme:
Infrastructure & Tooling
Dockerfilefor efficient development, build, and production deployment, including dependency installation, build, and secure runtime stages..dockerignoreto exclude unnecessary files and improve Docker build performance.components.jsonto configure the UI library, aliases, and icon set for consistent component development.Documentation
README.mdto provide clear project overview, local and Docker-based development instructions, production deployment steps, and testing guidelines.API & Backend
/api/rates/latestAPI route to fetch and return AUD-based exchange rates, supporting optional currency filtering via query parameters.UI & Frontend Structure
app/page.tsx) to introduce a sidebar layout with a header and placeholder for the currency converter UI.ThemeProviderand utility class integration to enable dark mode and consistent theming throughout the app. [1] [2]globals.cssto define a comprehensive color palette, support for dark mode, and improved base styles leveraging CSS variables.UI Components
CurrencyAmountInput, a controlled numeric input with validation, accessible labeling, and a refresh button for updating rates.CurrencyCard, a reusable component to display converted currency amounts, rates, and metadata in a visually appealing card format.