A beautiful website directory for discovering and sharing cool websites across the web. Built with React, TypeScript, Node.js, Express, and MongoDB.
- π Authentication: Separate login/register pages with role selection (User/Admin)
- π¨ Beautiful UI: Pink & black themed interface with Aceternity UI 3D card animations
- π Search & Filter: Find websites by name, description, or category
- β Rating System: Rate your favorite websites (1-5 stars)
- π Bookmarks: Save websites to your personal collection
- π Submit Websites: Suggest new websites for admin review
- π± Responsive Design: Works perfectly on mobile, tablet, and desktop
- π Admin Panel: Comprehensive dashboard for managing the platform
- β Approve Submissions: Review and approve user-submitted websites
- β Add Websites: Manually add new websites
- βοΈ Edit Websites: Update existing website information
- ποΈ Delete Websites: Remove websites from the directory
- β Feature Websites: Mark websites as featured for prominence
- π₯ User Management: View and manage registered users
- React with TypeScript
- Vite for fast development
- React Router for navigation
- Tailwind CSS for styling
- Aceternity UI for 3D card animations
- Lucide React for icons
- Node.js with Express
- MongoDB with Mongoose
- JWT for authentication
- bcryptjs for password hashing
NetNuggets/
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ ui/ # Aceternity UI components
β β β βββ Header.tsx # Main header with search
β β β βββ WebsiteCard.tsx # 3D card for websites
β β β βββ SubmitForm.tsx # Website submission form
β β β βββ ProtectedRoute.tsx # Route protection
β β βββ pages/
β β β βββ LoginPage.tsx # Login with role selection
β β β βββ RegisterPage.tsx # Register with admin code
β β β βββ HomePage.tsx # Main website directory
β β β βββ AdminPanel.tsx # Admin dashboard
β β βββ context/
β β β βββ AuthContext.tsx # Global auth state
β β βββ services/
β β β βββ api.ts # API service layer
β β βββ types/
β β βββ index.ts # TypeScript interfaces
β βββ package.json
βββ backend/
β βββ src/
β β βββ models/
β β β βββ User.js # User model with roles
β β β βββ Website.js # Website model
β β β βββ Submission.js # Submission model
β β βββ routes/
β β β βββ auth.js # Authentication routes
β β β βββ websites.js # Website CRUD routes
β β β βββ user.js # User-specific routes
β β β βββ admin.js # Admin-only routes
β β βββ middleware/
β β β βββ auth.js # JWT verification
β β β βββ admin.js # Admin role check
β β βββ server.js # Express server
β β βββ seed.js # Database seeding
β βββ package.json
βββ README.md
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- npm or yarn
git clone <your-repo-url>
cd NetNuggets# Navigate to backend folder
cd backend
# Install dependencies
npm install
# Create .env file
# Copy the following and update MongoDB URI if needed:Create backend/.env:
MONGODB_URI=mongodb://localhost:27017/netnuggets
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
ADMIN_SECRET_CODE=admin123secret
PORT=5000# Seed the database with sample data
npm run seed
# Start the backend server
npm run devThe backend will run on http://localhost:5000
# Navigate to frontend folder (from project root)
cd frontend
# Install dependencies
npm install
# Create .env fileCreate frontend/.env:
VITE_API_URL=http://localhost:5000/api
VITE_ADMIN_CODE=admin123secret# Start the frontend development server
npm run devThe frontend will run on http://localhost:5173
Place your custom background image at:
frontend/public/login-bg.jpg
Recommended size: 1920x1080 or higher
Windows:
# Download from: https://www.mongodb.com/try/download/community
# Or use MongoDB Atlas (cloud): https://www.mongodb.com/cloud/atlasMac:
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-communityLinux:
sudo apt-get install mongodb
sudo systemctl start mongodbAfter running npm run seed:
Admin Account:
- Email:
admin@netnuggets.com - Password:
admin123
User Account:
- Email:
user@example.com - Password:
user123
Admin Registration Code:
- Code:
admin123secret(required when registering as admin)
- Register/Login: Choose "User" and create an account
- Browse Websites: Explore the curated collection
- Search & Filter: Use search bar and category filters
- Bookmark: Click bookmark icon on any website
- Rate: Click stars to rate (1-5)
- Submit: Click "Submit Site" to suggest new websites
- Register/Login: Choose "Admin" and enter admin code
- Access Admin Panel: Click "Admin Panel" in header
- Review Submissions: Approve or reject user submissions
- Add Websites: Manually add new websites with custom details
- Manage Websites: Edit, feature, or delete existing websites
- View Users: See all registered users
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
GET /api/websites- Get all approved websitesGET /api/websites/:id- Get website by IDPOST /api/websites- Create website (admin)PUT /api/websites/:id- Update website (admin)DELETE /api/websites/:id- Delete website (admin)POST /api/websites/:id/rate- Rate website (auth)
POST /api/user/bookmark- Toggle bookmark (auth)GET /api/user/bookmarks- Get bookmarks (auth)POST /api/user/submit- Submit website (auth)
GET /api/admin/submissions- Get all submissions (admin)POST /api/admin/submissions/:id/approve- Approve submission (admin)POST /api/admin/submissions/:id/reject- Reject submission (admin)GET /api/admin/users- Get all users (admin)DELETE /api/admin/users/:id- Delete user (admin)
MONGODB_URI=mongodb://localhost:27017/netnuggets
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
ADMIN_SECRET_CODE=admin123secret
PORT=5000VITE_API_URL=http://localhost:5000/api
VITE_ADMIN_CODE=admin123secretnpm run dev # Start with nodemon (auto-restart)
npm start # Start production server
npm run seed # Seed database with sample datanpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build- Email verification for registration
- Password reset functionality
- User profiles with submission history
- Comments and discussions on websites
- Social sharing features
- Website screenshots/previews
- Advanced search with tags
- Newsletter subscription
- Analytics dashboard for admins
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this project for personal or commercial purposes.
For issues or questions, please open an issue on GitHub.
Made with β€οΈ and lots of β
Happy discovering! πβ¨ "# NetNuggets"