A modern, responsive web application for Forex trading built with React, TypeScript, and Tailwind CSS. This platform provides users with access to global markets, advanced trading tools, competitive spreads, and institutional-grade execution.
- Modern UI/UX: Responsive design with beautiful gradients and smooth animations
- Trading Markets: Access to Forex, Stocks, Indices, Commodities, Cryptocurrencies, Shares, and ETFs
- Real-time Market Data: Live market data strips and price updates
- Performance Optimized: Code-splitting, lazy loading, and memoization for optimal performance
- Accessibility: WCAG compliant with proper ARIA attributes and keyboard navigation
- Error Handling: Robust error boundaries for graceful error handling
- Type Safety: Full TypeScript implementation with strict mode enabled
- React 19.2 - UI library
- TypeScript 5.9 - Type safety and enhanced developer experience
- Vite 7.2 - Fast build tool and development server
- React Router DOM 7.10 - Client-side routing
- Tailwind CSS 3.4 - Utility-first CSS framework
- PostCSS - CSS processing
- Autoprefixer - Automatic vendor prefixing
- ESLint 9.39 - Linting and code quality
- TypeScript ESLint - TypeScript-specific linting rules
- React Hooks ESLint Plugin - Enforce React hooks rules
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher recommended)
- npm or yarn package manager
- Git (for version control)
-
Clone the repository
git clone <repository-url> cd PM-Test
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173(or the port shown in your terminal)
To start developing, run the development server:
npm run devThis will start the Vite development server with hot module replacement (HMR), allowing you to see changes instantly in your browser. The application will be available at http://localhost:5173 (or the next available port).
| Script | Description |
|---|---|
npm run dev |
Start the development server with hot module replacement |
npm run build |
Build the application for production |
npm run preview |
Preview the production build locally |
npm run lint |
Run ESLint to check code quality |
src/
βββ assets/ # Static assets (images, icons)
β βββ icons/ # SVG and PNG icons
β βββ images/ # Image assets
βββ components/ # React components
β βββ common/ # Reusable components (Button, Card, Container, etc.)
β βββ footer/ # Footer components
β βββ header/ # Header and navigation components
β βββ home/ # Home page specific components
βββ pages/ # Page components
β βββ home/ # Home page
βββ App.tsx # Main application component
βββ main.tsx # Application entry point
βββ index.css # Global styles and Tailwind imports
This project follows strict coding standards defined in .cursor rules:
- β
Use
React.FCfor all functional components with props - β Implement proper TypeScript interfaces for all props and state
- β Utilize TypeScript's strict mode
- β
Use
.tsxextension for files with JSX
- β
Use
React.memofor components with expensive render operations - β
Implement
useCallbackfor functions passed as props - β
Use
useMemofor expensive computations and object/array creation - β
Code-splitting with
React.lazyandSuspense - β Proper dependency arrays in hooks
- β Semantic HTML elements
- β
ARIA attributes (
aria-label,aria-hidden,role) - β
Keyboard navigation support (
tabIndex) - β Alt text for all images
- β Proper focus management
- β Error boundaries implemented for robust error handling
- β Graceful error fallbacks
- β ESLint with TypeScript and React plugins
- β Consistent naming conventions
- β Proper code organization and folder structure
-
Build the application
npm run build
-
Preview the production build
npm run preview
The production build will be generated in the dist/ directory, optimized and ready for deployment.
- Always use functional components with
React.FC - Define TypeScript interfaces for component props
- Use
React.memofor reusable components - Extract event handlers with
useCallback - Memoize expensive computations with
useMemo
- Use Tailwind CSS utility classes
- Follow mobile-first responsive design approach
- Maintain consistent spacing and typography
- Use semantic color names from Tailwind config
- Use PascalCase for component files (e.g.,
Button.tsx) - Use camelCase for utility files
- Keep component files co-located with their styles if needed
react- React libraryreact-dom- React DOM rendererreact-router-dom- Routing library
@vitejs/plugin-react- Vite plugin for Reacttypescript- TypeScript compilertailwindcss- CSS frameworkeslint- Linting tooltypescript-eslint- TypeScript ESLint integration
This application supports all modern browsers:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Currently, the project uses Vite's built-in environment variables:
import.meta.env.DEV- Development mode flagimport.meta.env.PROD- Production mode flag
For custom environment variables, create a .env file in the root directory.
- Create a feature branch from
main - Make your changes following the code standards
- Run
npm run lintto ensure code quality - Test your changes thoroughly
- Submit a pull request with a clear description