A simple business directory and yellow pages clone. Users can find local services by category or location, and business owners can submit listings for review.
I built this to practice handling multi-level categories (Category -> SubCategory) and setting up a basic admin moderation flow in a MERN environment.
- Search & Discovery: Filter businesses by keyword, location, and specific industry categories.
- Listing Workflow: Owners can submit business details; listings remain "pending" until an admin approves them.
- Admin Panel: Protected dashboard to moderate listings and toggle "Featured" status for businesses.
- Auth: Basic JWT authentication for users and role-based protection for the admin area.
- Frontend: React, Tailwind CSS, Lucide Icons.
- Backend: Node.js, Express, MongoDB.
- Libraries: Axios for API calls, Mongoose for modeling, and Bcrypt for security.
Rename or create a .env file in the /server directory:
PORT=5000
MONGO_URI=your_mongodb_atlas_uri
JWT_SECRET=secret_key
NODE_ENV=development# Install backend dependencies
cd server
npm install
# Install frontend dependencies
cd ../client
npm installTo see the app in action with realistic data, run these in the /server directory:
node utils/seed.js- Sets up the admin and main categories.node seed/seedSubCategories.js- Adds industry-specific subcategories.node seed/seedCategoryBusinesses.js- Populates the site with sample listings.
- Backend:
node server.js(inside /server) - Frontend:
npm run dev(inside /client)
- Admin: admin@example.com / password123
- Listing Owner: Register via the signup page.