A Next.js admin portal for managing the Shiply platform, built with TypeScript, Tailwind CSS, Firebase Authentication, and Firestore database.
- 🔐 Firebase Authentication - Secure admin login system
- 📊 Dashboard - Overview of platform statistics and recent activity
- 👥 User Management - View and manage user accounts
- 💬 Feedback Management - Review and process user feedback
- 🌐 Website Management - Manage connected websites and their settings
- 📈 Analytics - Detailed insights and analytics
- ⚙️ Settings - Configure platform and AI processing settings
- 🎨 Modern UI - Clean, responsive design with Tailwind CSS
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Authentication: Firebase Auth
- Database: Firestore
- Icons: Emoji-based icons for simplicity
- Node.js 18+
- npm or yarn
- Firebase project with Authentication and Firestore enabled
-
Clone the repository and navigate to the admin portal directory:
cd admin-portal -
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.localfile in the root directory and add your Firebase configuration:NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
- Go to the Firebase Console
- Create a new project
- Enable Authentication and Firestore Database
- In the Firebase Console, go to Authentication > Sign-in method
- Enable Email/Password authentication
- Create an admin user account
- In the Firebase Console, go to Firestore Database
- Create a database in production mode
- Set up the following collections structure:
users/
- userId: string
- email: string
- name?: string
- website?: string
- createdAt: timestamp
- lastLogin?: timestamp
- isActive: boolean
feedback/
- id: string
- userId: string
- content: string
- rating?: number
- category?: string
- sentiment?: 'positive' | 'negative' | 'neutral'
- createdAt: timestamp
- processed: boolean
- aiAnalysis?: {
summary: string
keywords: string[]
sentiment: string
priority: 'low' | 'medium' | 'high'
}
websites/
- id: string
- userId: string
- domain: string
- name: string
- createdAt: timestamp
- isActive: boolean
- settings: {
theme: string
position: string
autoCollect: boolean
}
src/
├── app/
│ ├── (dashboard)/ # Protected dashboard routes
│ │ ├── dashboard/ # Main dashboard page
│ │ ├── users/ # User management
│ │ ├── feedback/ # Feedback management
│ │ ├── websites/ # Website management
│ │ ├── analytics/ # Analytics page
│ │ ├── settings/ # Settings page
│ │ └── layout.tsx # Dashboard layout with auth
│ ├── login/ # Login page
│ ├── layout.tsx # Root layout with auth provider
│ └── page.tsx # Home page (redirects to login/dashboard)
├── components/
│ ├── AuthContext.tsx # Firebase auth context
│ ├── ProtectedRoute.tsx # Route protection component
│ ├── Header.tsx # Dashboard header
│ ├── Sidebar.tsx # Navigation sidebar
│ ├── LoginForm.tsx # Login form component
│ ├── DashboardStats.tsx # Dashboard statistics
│ └── RecentFeedback.tsx # Recent feedback component
├── lib/
│ ├── firebase.ts # Firebase configuration
│ └── firestore.ts # Firestore database utilities
└── types/
└── index.ts # TypeScript type definitions
- Platform statistics overview
- Recent feedback display
- Quick action buttons
- Real-time data updates
- View all registered users
- User status management
- User activity tracking
- Website associations
- View all feedback submissions
- AI analysis results
- Sentiment analysis
- Priority classification
- Processing status tracking
- Comprehensive platform metrics
- Sentiment distribution charts
- Category breakdowns
- Recent activity tracking
- Visual data representations
- General platform settings
- AI processing configuration
- Email notification preferences
- Admin account management
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- Create new components in
src/components/ - Add new pages in
src/app/(dashboard)/ - Update types in
src/types/index.ts - Add Firestore utilities in
src/lib/firestore.ts
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically
The app can be deployed to any platform that supports Next.js:
- Netlify
- AWS Amplify
- Railway
- DigitalOcean App Platform
- All routes are protected by Firebase Authentication
- Environment variables are properly configured
- Firestore security rules should be set up for production
- Admin access should be restricted to authorized users only
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is part of the Shiply platform. All rights reserved.