Ainaa is a comprehensive web application designed to provide internet protection and content filtering solutions for families, with a focus on protecting children from inappropriate content. The application offers various protection levels and setup guides for different devices including Windows, Android, and routers.
- Architecture
- Key Features
- Project Structure
- Setup and Installation
- Configuration
- Protection Levels
- Device Support
- Component Documentation
- API Reference
- Deployment
- collaboration
Ainaa is built using Next.js 14, React 18, and TypeScript, with Tailwind CSS for styling. The application follows a component-based architecture with a focus on reusability and maintainability.
- Frontend Framework: Next.js 14.2.5
- UI Library: React 18.3.1
- Styling: Tailwind CSS 3.4.1
- Language: TypeScript
- Icons: React Icons, Radix UI Icons
- Utilities: clsx, tailwind-merge
- Multi-level Protection: Offers different protection levels (low and high) for various filtering needs
- Multi-device Support: Provides setup guides for Windows, Android, and router devices
- DNS-based Filtering: Uses custom DNS configurations for content filtering
- Guided Setup: Step-by-step instructions with embedded videos for easy implementation
- Arabic Interface: Fully localized in Arabic to serve the target audience
- Responsive Design: Works across mobile, tablet, and desktop devices
The project follows Next.js App Router structure:
ainaa-web/
├── app/ # Main application code
│ ├── _components/ # Shared components
│ ├── [gen]/ # Dynamic routes for generations
│ │ └── setupguide/ # Setup guide pages
│ │ └── [device]/ # Device-specific setup guides
│ │ └── [step]/ # Step-by-step instructions
│ ├── setupvalues/ # Protection levels information
│ ├── support/ # Customer support
│ ├── privacy/ # Privacy policy
│ └── layout.tsx # Root layout
├── public/ # Static assets
├── utils/ # Utility functions
└── tailwind.config.ts # Tailwind configuration
- Node.js 18.x or higher
- npm or yarn
-
Clone the repository:
git clone git@github.com:mafazaa-org/ainaa-web.git cd ainaa-web -
Install dependencies:
npm install # or yarn install -
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser to see the application.
Create a .env.local file in the root directory with the following variables:
NEXT_PUBLIC_SITE_URL=https://ainaa.mafazaa.com
The project uses custom colors defined in tailwind.config.ts:
colors: {
Red: "#E0462D",
Red2: "#A73826",
Text: "#353535",
dark: "#1E1E1E",
// Additional custom colors...
}Ainaa offers two main protection levels:
- Blocks basic inappropriate content
- Allows most regular content
- Suitable for adults and older teens
- DNS Configuration:
- Primary DNS: [16.24.111.209]
- Secondary DNS: [16.24.202.94]
- DNS-Over-HTTPS: low.mafazaa.com
- Comprehensive protection against most inappropriate content
- Blocks social media, video platforms, and other potentially harmful content
- Suitable for children and younger teens
- DNS Configuration:
- Primary DNS: [15.184.147.40]
- Secondary DNS: [15.184.182.221]
- DNS-Over-HTTPS: high.mafazaa.com
- Windows: Full application with DNS configuration
- Android: Mobile application with DNS configuration
- Router: Network-level protection for all connected devices
- iOS
- Linux
Displays a full-width hero section with title, description, and call-to-action buttons.
<HeroSection
className="bg-home-hero"
title="Title text"
description="Description text"
button1={{ text: "Button 1", href: "/link" }}
button2={{ text: "Button 2", handleClick: () => {} }}
/>Displays the available protection levels with their features and DNS configurations.
Displays a card for each supported device with an image and setup link.
Modal component that shows important information about the protection service.
Contains links to important pages, support, and information about Mafazaa (the parent organization).
The application primarily uses static data defined in TypeScript files:
setupValuesData.ts: Contains DNS configurations and features for each protection levelsetupGuideData.ts: Contains device-specific setup informationdeviceData.ts: Contains device parameters and embedded video links
npm run build
# or
yarn buildThe easiest way to deploy the application is using Vercel:
- Push your code to a Git repository (GitHub)
- Import the project in Vercel
- Configure environment variables
- Deploy
- Create a feature branch from
dev - Make your changes
- Run tests and ensure the application works correctly
- Submit a pull request
- Follow the existing code style
- Use TypeScript for type safety
- Write meaningful commit messages
- Document new components and features# عَيْنًا سَلْسَبِيلًا (Ainaa) - Technical Documentation