A modern, full-featured web application built with React, TypeScript, and Firebase, designed to support Ukraine's defense initiatives through drone technology projects and career opportunities.
Avidev is a comprehensive platform that showcases defense technology projects, provides career opportunities, and enables community engagement. The application features a public-facing website with project showcases, career listings, and contact forms, plus a secure admin panel for content management.
- Multi-language Support: Full internationalization (English/Ukrainian)
- Firebase Integration: Real-time database, authentication, and hosting
- Admin Panel: Secure content management system
- Responsive Design: Mobile-first approach with Tailwind CSS
- Type-Safe: Full TypeScript implementation
- Well-Tested: Comprehensive test coverage with Vitest
- Home Page: Hero section with statistics and featured projects
- Projects: Browse and view detailed information about defense technology projects
- Career: Job listings with application functionality
- Contact: Contact form for inquiries
- Internationalization: Switch between English and Ukrainian
- Theme: Dark mode design with green/orange accent colors
- Responsive: Optimized for all device sizes
- Secure Authentication: Email/password and Google OAuth
- Content Management: Create, update, and delete projects and job listings
- Protected Routes: Role-based access control
- Real-time Updates: Firebase Firestore integration
- Redux Toolkit 2.11 - State management
- TanStack Query 5.90 - Server state management
- React Router 7.13 - Client-side routing
- Material-UI 7.3 - Component library
- Tailwind CSS 4.2 - Utility-first CSS
- Emotion - CSS-in-JS styling
- Formik 2.4 - Form management
- Yup 1.7 - Schema validation
- i18next 25.8 - Internationalization framework
- react-i18next 16.5 - React bindings for i18next
- Vitest 4.1 - Unit testing framework
- Testing Library - React component testing
- ESLint 9.39 - Code linting
- Prettier 3.8 - Code formatting
- Husky 9.1 - Git hooks
The project follows Feature-Sliced Design (FSD) architecture for better scalability and maintainability:
src/
├── app/ # Application initialization layer
│ ├── layouts/ # Layout components (Main, Admin)
│ ├── providers/ # Context providers (Auth, Theme, Store, Router)
│ ├── router/ # Route configuration
│ ├── store/ # Redux store setup
│ └── styles/ # Global styles and theme
│
├── pages/ # Page components (route-level)
│ ├── main/ # Home page
│ ├── projects/ # Projects listing and details
│ ├── career/ # Career opportunities
│ ├── contact/ # Contact page
│ ├── admin/ # Admin dashboard
│ ├── admin-login/ # Admin authentication
│ ├── privacy/ # Privacy policy
│ └── terms/ # Terms of service
│
├── widgets/ # Complex UI blocks
│ ├── header/ # Navigation header
│ ├── footer/ # Footer with links
│ ├── hero/ # Hero section
│ ├── stats/ # Statistics display
│ └── project-card/ # Project preview cards
│
├── features/ # Business logic features
│ ├── auth/ # Authentication (login, Google OAuth, password reset)
│ ├── contact/ # Contact form logic
│ ├── locale/ # Language switching
│ ├── navigation/ # Navigation configuration
│ └── notification/ # Toast notifications
│
├── entities/ # Business entities
│ ├── auth/ # Auth service
│ ├── career/ # Career/job entities
│ └── project/ # Project entities
│
├── shared/ # Shared resources
│ ├── api/ # API clients and services
│ ├── ui/ # Reusable UI components
│ ├── hooks/ # Custom React hooks
│ ├── helpers/ # Utility functions
│ ├── constants/ # App constants
│ ├── i18n/ # Translation files
│ ├── lib/ # Third-party library wrappers
│ └── types/ # TypeScript type definitions
│
└── test/ # Test utilities and mocks
├── setup.ts # Test environment setup
├── test-utils.tsx # Testing utilities
├── helpers/ # Test helpers
└── mocks/ # Mock data and services
- Feature-Sliced Design: Organized by features and layers
- Separation of Concerns: Clear boundaries between layers
- Dependency Rule: Higher layers depend on lower layers, not vice versa
- Path Aliases: Using
@/for clean imports
- Node.js: 18.x or higher
- npm: 9.x or higher
- Firebase Account: For backend services
-
Clone the repository
git clone <repository-url> cd avidev-test-firebase
-
Install dependencies
npm install
-
Set up environment variables
Copy the example environment file:
cp .env.example .env
Fill in your Firebase configuration (see Configuration section)
-
Start the development server
npm run dev
The application will be available at
http://localhost:5173
Create a .env file in the root directory with your Firebase credentials:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_idnpm run dev- Start development server with hot reloadnpm run preview- Preview production build locally
npm run build- Build for production (TypeScript compilation + Vite build)
npm run test-watch- Run tests in watch modenpm run test:run- Run tests oncenpm run test:coverage- Generate test coverage report
npm run lint- Lint and auto-fix code with ESLintnpm run format- Format code with Prettier
npm run pre-commit- Run linting and tests before commitnpm run pre-push- Build project before pushnpm run prepare- Set up Husky git hooks
-
Redux Toolkit - Global application state
- Authentication state
- Locale/language preferences
- UI notifications
-
TanStack Query - Server state
- Projects data
- Career listings
- Caching and synchronization
-
Local State - Component-specific state
- Form inputs
- UI toggles
- Temporary data
/ # Home page
/projects # Projects listing
/projects/:id # Project details
/career # Career opportunities
/contact # Contact form
/privacy # Privacy policy
/terms # Terms of service
/admin/login # Admin login
/admin # Admin dashboard (protected)
- User visits
/admin/login - Authenticates via Email/Password or Google OAuth
- Firebase returns user credentials
- App checks for admin role
- Redirects to
/admindashboard or shows error - Protected routes use
RequireAdminAuthguard
User Action → Component → Feature Hook → API Service → Firebase
↓ ↓
Local State ← TanStack Query/Redux ← Response
- Unit Tests: Individual functions and components
- Integration Tests: Feature workflows
- Component Tests: React component behavior
# Watch mode (recommended for development)
npm run test-watch
# Single run
npm run test:run
# With coverage report
npm run test:coverage- Component tests:
*.test.tsxnext to component files - Hook tests:
*.test.tsnext to hook files - Utility tests:
*.test.tsnext to utility files
Located in src/test/:
setup.ts- Test environment configurationtest-utils.tsx- Custom render functions with providersmocks/- Firebase and API mocks
- React-specific rules
- TypeScript type checking
- React Hooks rules
- Auto-fix on save
- Consistent code formatting
- Integrated with ESLint
- Pre-commit formatting
- Pre-commit: Runs linting and tests on staged files
- Pre-push: Ensures production build succeeds
npm run buildThis creates an optimized production build in the dist/ directory.
-
Install Firebase CLI:
npm install -g firebase-tools
-
Login to Firebase:
firebase login
-
Initialize hosting:
firebase init hosting
-
Deploy:
firebase deploy
/* Backgrounds */
bg-zinc-950 /* Main background */
bg-zinc-900 /* Sections */
bg-zinc-800 /* Cards */
/* Text */
text-zinc-100 /* Primary text */
text-zinc-400 /* Secondary text */
/* Primary (Green) */
bg-green-800 /* Primary buttons */
bg-green-700 /* Hover state */
text-green-400 /* Accents */
border-green-700
/* Accent (Orange) */
accent-orange-500 /* Alerts / CTA */- Font Family: System fonts for optimal performance
- Headings: Bold, large sizes for hierarchy
- Body: Regular weight, readable sizes
Tailwind CSS default breakpoints:
sm: 640pxmd: 768pxlg: 1024pxxl: 1280px2xl: 1536px
- Create a feature branch from
main - Make your changes following the code style
- Write/update tests for your changes
- Ensure all tests pass:
npm run test:run - Ensure linting passes:
npm run lint - Ensure formatting passes:
npm run format - Commit with descriptive messages
- Push and create a Pull Request
- Use TypeScript for all new files
- Follow Feature-Sliced Design architecture
- Write tests for new features
- Use meaningful variable and function names
- Add JSDoc comments for complex functions
- Keep components small and focused
type(scope): description using 'git commit -m "description" -m "ticket number"'
Types: feature, fix, docs, style, refactor, test