A comprehensive admin interface for managing colleges, schools, and firms with Cloudinary integration for file uploads.
- 📚 College Management: Create, read, update, and delete college entries
- 🏫 School Management: Manage school institutions
- 🏢 Firm Management: Handle firm/company data
- 📸 File Uploads: Cloudinary integration for images and videos
- 📊 Dashboard: Statistics and overview of all entities
- 🎨 Modern UI: Clean, responsive design with Tailwind CSS
- Framework: Next.js 15.3.2
- Database: MongoDB with Prisma ORM
- File Storage: Cloudinary
- Styling: Tailwind CSS
- UI Components: Radix UI
- Forms: React Hook Form with Zod validation
- Node.js 18+
- MongoDB database
- Cloudinary account
- Clone the repository:
git clone <repository-url>
cd lnct
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env
file in the root directory with:
# Database
DATABASE_URL=mongodb+srv://username:password@cluster.mongodb.net/lnct?retryWrites=true&w=majority&appName=AppName
# Cloudinary
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloud_name
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=your_upload_preset
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
- Generate Prisma client:
npx prisma generate
- Run the development server:
npm run dev
Open http://localhost:3000 to view the application.
Set the following environment variables in your Vercel dashboard:
DATABASE_URL
: Your MongoDB connection stringNEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
: Your Cloudinary cloud nameNEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET
: Your Cloudinary upload presetCLOUDINARY_API_KEY
: Your Cloudinary API key (optional for server-side uploads)CLOUDINARY_API_SECRET
: Your Cloudinary API secret (optional for server-side uploads)
- Push your code to GitHub
- Connect your repository to Vercel
- Set the environment variables
- Deploy!
The build process will automatically:
- Generate the Prisma client
- Build the Next.js application
- Deploy to Vercel's edge network
Access the admin interface at /admin
to:
- View dashboard with statistics
- Manage colleges at
/admin/colleges
- Manage schools at
/admin/school
- Manage firms at
/admin/firms
Colleges:
- Basic information (name, description, website)
- Logo upload
- Multiple contact numbers
- Location coordinates
- Photo galleries
- Event photos and videos
- Course listings with logos
- Partner company information
Schools & Firms:
- Similar to colleges but without courses and companies
- Streamlined interface for educational institutions and businesses
Files are organized in Cloudinary folders:
lnct/
- General uploadslnct/courses/
- Course logoslnct/companies/
- Company logos
GET/POST /api/admin/colleges
- List/Create collegesGET/PUT/DELETE /api/admin/colleges/[id]
- Individual college operationsGET/POST /api/admin/schools
- List/Create schoolsGET/PUT/DELETE /api/admin/schools/[id]
- Individual school operationsGET/POST /api/admin/firms
- List/Create firmsGET/PUT/DELETE /api/admin/firms/[id]
- Individual firm operationsGET /api/admin/stats
- Dashboard statisticsPOST /api/upload
- File upload endpoint
The application uses MongoDB with Prisma. Key models:
College
- College institutionsSchool
- School institutionsFirm
- Business firms
Each model includes:
- Basic information fields
- File upload arrays (photos, event media)
- Location data
- Contact information
Two upload components are available:
FileUpload
- Multi-file drag & drop uploadsSingleFileUpload
- Single file uploads with preview
Both integrate directly with Cloudinary for seamless file management.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.