Mahorat Soft - bu professional web development va branding xizmatlarini ko'rsatadigan corporate website va admin panel bilan jihozlangan to'liq funksional Next.js loyihasi.
Bu Digital Agency Portfolio Website bo'lib, quyidagi funksiyalarga ega:
- Public Website - Kompaniya haqida ma'lumot, xizmatlar, portfolio, kontakt
- Admin Panel - Loyihalarni boshqarish uchun to'liq CRUD funksiyalari
- Authentication System - JWT asosida xavfsiz kirish tizimi
- Framework: Next.js 16.0.3 (App Router)
- Language: TypeScript 5.9.3
- Styling: Tailwind CSS 4
- UI Components:
- Radix UI (Dialog, Dropdown, Alert, Checkbox, va h.k.)
- Custom UI components (Button, Card, Form, Input, va h.k.)
- Form Handling: React Hook Form + Zod validation
- Icons: Lucide React
- Notifications: Sonner (toast notifications)
- Animations: Custom CSS animations va particles
- Database: PostgreSQL (Neon Database)
- ORM: Drizzle ORM
- Authentication: JWT (Access + Refresh tokens)
- File Storage:
- Vercel Blob Storage (rasmlar uchun)
- Cloudinary (backup/alternativ)
- Server Actions: Next.js Server Actions
- Deployment: Vercel (optimized)
- Database Hosting: Neon Database (serverless PostgreSQL)
src/
├── actions/ # Server Actions
│ ├── auth.action.ts # Authentication (login, register, logout)
│ ├── project.action.ts # Project CRUD operations
│ └── file.action.ts # File upload/delete
│
├── app/ # Next.js App Router
│ ├── (root)/ # Public pages
│ │ └── (home)/ # Homepage
│ └── admin/ # Admin panel
│ ├── (auth)/ # Login/Register pages
│ └── (root)/ # Protected admin pages
│ ├── (dashboard)/ # Dashboard
│ └── projects/ # Projects management
│
├── components/
│ ├── sections/ # Homepage sections
│ │ ├── hero.section.tsx
│ │ ├── about.section.tsx
│ │ ├── services.section.tsx
│ │ ├── portfolio.section.tsx
│ │ ├── contact.section.tsx
│ │ └── ... (10 ta section)
│ ├── shared/ # Shared components
│ │ ├── navbar.tsx
│ │ ├── footer.tsx
│ │ └── particle.tsx
│ └── ui/ # Reusable UI components
│
├── drizzle/ # Database
│ ├── schemas/ # Database schemas
│ │ ├── user.schema.ts
│ │ └── project.schema.ts
│ └── index.ts # Database connection
│
├── hooks/ # Custom React hooks
│ └── use-particles.ts
│
├── lib/ # Utilities
│ ├── constants.ts # Constants va static data
│ ├── validations.ts # Zod schemas
│ ├── jwt.ts # JWT functions
│ ├── cloudinary.ts # Cloudinary config
│ └── utils.ts # Helper functions
│
└── types/ # TypeScript types
└── index.d.ts
- Animated Particles - Floating particles animatsiyalari
- Gradient Backgrounds - Dynamic gradient effects
- Neon Glow Effects - Modern neon glow animations
- Floating Shapes - Geometric shapes animatsiyalari
- Tech Grid Background - Futuristic grid pattern
- Smooth Scrolling - Section-to-section navigation
- Mobile-first approach
- Tablet va desktop optimizatsiyasi
- Adaptive navigation (mobile menu)
- Responsive grid layouts
- Primary: Blue (#122866)
- Secondary: Cyan/Teal
- Modern gradient combinations
- Dark/Light theme support (via next-themes)
-
JWT-based Authentication
- Access Token (15 daqiqa)
- Refresh Token (7 kun)
- HttpOnly cookies (xavfsizlik)
-
Role-based Access
- User role (default)
- Admin role (full access)
-
Protected Routes
- Middleware orqali route protection
- Automatic token refresh
- Redirect to login if unauthorized
- User register qiladi (
/admin/register) - Database'da role
adminga o'zgartiriladi - Login qiladi (
/admin/login) - Tokens set qilinadi
- Admin panelga kirish mumkin
id(UUID, primary key)fullName(text)username(text, unique)password(hashed with bcrypt)role(enum: 'user' | 'admin')createdAt,updatedAt(timestamps)
id(UUID, primary key)title(text)description(text)image(text, URL)featured(boolean, default: false)userId(UUID, foreign key)createdAt,updatedAt(timestamps)
- User has many Projects
- Project belongs to User
-
Hero Section
- Animated background
- Call-to-action buttons
- Smooth scroll navigation
-
About Section
- Kompaniya haqida ma'lumot
- Features showcase
- Visual elements
-
Services Section
- Web Development
- Branding
- IT Solutions
- Service lists
-
Portfolio Section
- Featured projects (max 6 ta)
- Project cards with images
- Dynamic loading from database
-
Work Process Section
- 6 qadamli jarayon ko'rsatkichi
-
Why Websites Section
- 4 ta asosiy afzallik
-
Partners Section
- Hamkorlar ro'yxati
-
Contact Section
- Contact form
- Telegram bot orqali xabar yuborish
- Contact information
-
Footer
- Links
- Social media
- Company info
-
Dashboard
- Featured projects ko'rinishi
- Quick stats
-
Projects Management
- Create: Yangi loyiha qo'shish
- Read: Barcha loyihalarni ko'rish
- Update: Loyihani tahrirlash
- Delete: Loyihani o'chirish
- Featured: Featured qilish (max 6 ta)
-
File Upload
- Vercel Blob orqali rasm yuklash
- Image preview
- File deletion
-
Authentication
- Login/Register
- Session management
- Auto logout
DATABASE_URL- PostgreSQL connectionACCESS_TOKEN_SECRET- JWT access tokenREFRESH_TOKEN_SECRET- JWT refresh tokenNEXT_PUBLIC_CLOUDINARY_*- Cloudinary configNEXT_PUBLIC_TELEGRAM_*- Telegram botBLOB_READ_WRITE_TOKEN- Vercel Blob
- Featured Projects Limit: 6 ta
- Image Upload: Vercel Blob Storage
- Contact Form: Telegram bot integration
- Token Expiry: Access (15min), Refresh (7 days)
/- Homepage (barcha sections)
/admin/login- Login page/admin/register- Register page/admin- Dashboard/admin/projects- Projects management
Bu loyiha Mahorat Soft kompaniyasining:
- Portfolio website sifatida
- Xizmatlarni ko'rsatish
- Mijozlar bilan bog'lanish
- Loyihalarni namoyish qilish
- Admin orqali kontentni boshqarish
uchun yaratilgan professional corporate website.
- ✅ Database connection - Neon connection to'g'ri sozlandi
- ✅ Middleware -
middleware.tsto'g'ri joyga ko'chirildi - ✅ Console.log - Debug kodlar olib tashlandi
- ✅ Featured limit logic - To'g'ri ishlaydi
- ✅ RevalidatePath - To'g'ri pathlar qo'shildi
- ✅ Duplicate code - Takrorlangan kod olib tashlandi
src/app/admin/(root)/projects/page.tsx- 13-qatordaconsole.logbor (debug uchun)src/app/admin/_components/project-form.tsx- 73-qatorda typo: "wronq" -> "wrong"
- Next.js Image optimization
- Server-side rendering (SSR)
- Static generation where possible
- Code splitting
- Lazy loading
- Optimized bundle size
- JWT tokens (HttpOnly cookies)
- Password hashing (bcrypt)
- Protected routes (middleware)
- Input validation (Zod)
- SQL injection protection (Drizzle ORM)
- XSS protection (React)
- Language Support: UZ, RU, EN (UI ready, lekin full i18n emas)
- Theme: Dark/Light mode ready (next-themes)
- SEO: Metadata optimization
- Accessibility: Semantic HTML, ARIA labels
Bu loyiha quyidagi texnologiyalarni o'rganish uchun yaxshi misol:
- Next.js App Router
- Server Actions
- Drizzle ORM
- JWT Authentication
- File Upload
- Modern UI/UX
- TypeScript best practices
Yaratilgan: 2025 Framework: Next.js 16 Status: Production Ready ✅