Project Configuration
Relevant source files
The following files were used as context for generating this wiki page:
This project is a web application built with Next.js, TypeScript, and Tailwind CSS. The project configuration encompasses dependency management, build scripts, styling and theming, internationalization (i18n), and development guidelines. Key configuration files like package.json, src/app/globals.css, and src/app/layout.tsx define the core behavior, appearance, and structure of the application. The configuration is designed to support a modern, responsive, and multi-language user experience.
Sources: README.md, package.json, src/app/globals.css
Core Dependencies & Scripts
The project's foundation is defined in package.json, which lists all dependencies and provides scripts for development, building, and linting.
Source: package.json
Dependencies
The project relies on a minimal set of core dependencies for its frontend functionality and a set of development dependencies for building, linting, and type-checking.
Production Dependencies
| Package | Version | Description |
|---|---|---|
react | 19.1.0 | A JavaScript library for building user interfaces. |
react-dom | 19.1.0 | Serves as the entry point to the DOM and server renderers for React. |
next | 15.4.5 | The React framework for production. |
| Source: package.json:10-13 |
Development Dependencies
| Package | Version | Description |
|---|---|---|
typescript | ^5 | A typed superset of JavaScript that compiles to plain JavaScript. |
@types/node | ^20 | TypeScript definitions for Node.js. |
@types/react | ^19 | TypeScript definitions for React. |
@types/react-dom | ^19 | TypeScript definitions for React DOM. |
@tailwindcss/postcss | ^4 | A PostCSS plugin for Tailwind CSS. |
tailwindcss | ^4 | A utility-first CSS framework. |
eslint | ^9 | A tool for identifying and reporting on patterns in ECMAScript/JavaScript code. |
eslint-config-next | 15.4.5 | ESLint configuration for Next.js projects. |
@eslint/eslintrc | ^3 | ESLint configuration file management. |
| Source: package.json:14-24 |
Scripts
The package.json file defines scripts for common development tasks.
| Script | Command | Description |
|---|---|---|
dev | next dev --turbopack | Starts the development server with Turbopack for faster performance. |
build | next build | Creates an optimized production build of the application. |
start | next start | Starts the production server. |
lint | next lint | Runs ESLint to find and fix problems in the code. |
| Source: package.json:5-9 |
Development and Deployment Workflow
The standard workflow involves cloning the repository, installing dependencies, and running the development server. For production, the application is built and then started. The project is designed for easy deployment on platforms like Vercel.
Sources: DEPLOYMENT.md, CONTRIBUTING.md
This diagram illustrates the typical development and deployment lifecycle.
Sources: DEPLOYMENT.md:3-20, CONTRIBUTING.md:100-106
Styling and Theming
The project uses Tailwind CSS for styling, with a custom dark theme defined by CSS variables in the :root selector of the global stylesheet. These variables control the application's color palette.
Source: src/app/globals.css:3-19
Theme Color Variables
| Variable | Value | Description |
|---|---|---|
--background | #1a202c | Main background color. |
--foreground | #ffffff | Main text color. |
--card | #2d3748 | Background color for card components. |
--card-foreground | #ffffff | Text color inside card components. |
--border | #4a5568 | Border color for elements. |
--input | #2d3748 | Background color for input fields. |
--primary | #63b3ed | Primary accent color (e.g., buttons). |
--primary-foreground | #ffffff | Text color for primary elements. |
--secondary | #4a5568 | Secondary color. |
--accent | #2c5282 | Accent color for highlighting. |
--muted | #4a5568 | Muted color for less important elements. |
--muted-foreground | #a0aec0 | Text color for muted elements. |
| Sources: src/app/globals.css:4-19, CONTRIBUTING.md:83-96 |
Fonts
The application uses the Geist and Geist_Mono fonts, which are loaded and configured in the root layout. These fonts are assigned to CSS variables --font-geist-sans and --font-geist-mono for global use.
Source: src/app/layout.tsx:2-15
// File: src/app/layout.tsx
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
Source: src/app/layout.tsx:5-15
Internationalization (i18n)
The application is configured to support multiple languages through a custom context provider and a centralized translation file. The LanguageProvider wraps the application's children in the root layout, making translations available throughout the component tree.
Sources: src/app/layout.tsx:4, 25-27, src/i18n/translations.ts
Supported Languages
The application supports English (en), Russian (ru), and Ukrainian (uk).
Source: src/i18n/translations.ts:1
Configuration Structure
Translations are stored in a translations object, where each key is a language code. This object is then used by the LanguageContext to provide the correct strings based on the selected language.
This diagram shows how the i18n system is structured.
A snippet of the translation object shows its structure:
// File: src/i18n/translations.ts
export type Language = 'en' | 'ru' | 'uk';
export interface Translations {
// Navigation
home: string;
potassium: string;
// ... more keys
}
export const translations: Record<Language, Translations> = {
en: {
home: 'Home',
potassium: 'Potassium',
// ...
},
ru: {
home: 'Главная',
potassium: 'Калий',
// ...
},
uk: {
home: 'Головна',
potassium: 'Калій',
// ...
},
};
Source: src/i18n/translations.ts:1-10, 412-432
Project Structure
The project follows a standard Next.js App Router structure. Key directories are organized by feature or concern, as documented in the README.md and CONTRIBUTING.md files. This structure separates concerns, with routing and layouts in app/, reusable UI in components/, business logic for each calculator in calculators/, shared types in types/, and language configurations in i18n/.
Sources: README.md:32-48, CONTRIBUTING.md:121-128, PROJECT_SUMMARY.md:92-102
File Structure Overview
src/
├── app/ # Next.js App Router (pages, layout)
├── components/ # Reusable UI components
├── calculators/ # Core calculator components
├── types/ # TypeScript type definitions
└── i18n/ # Internationalization files
Sources: README.md:33-48, CONTRIBUTING.md:122-127