A modern, responsive restaurant rating application built with Angular 17 and Firebase, inspired by Yelp. Users can discover restaurants, read reviews, and share their dining experiences with a beautiful, intuitive interface.
๐ Live Demo: https://firebase-practice--fir-practice-54eb3.us-central1.hosted.app/
- Browse and search restaurants by cuisine, location, and price range
- Advanced filtering and sorting options
- Real-time search with debounced input
- Responsive grid and list layouts
- 5-star rating system with half-star support
- Detailed review system with comments
- Average rating calculations and statistics
- Secure login/signup with Firebase Authentication
- User profile management
- Protected routes and data access
- Responsive design for desktop, tablet, and mobile
- Beautiful gradient design with smooth animations
- Material Design components with Tailwind CSS
- Loading states and error handling
- Real-time data with Firestore
- Secure authentication and authorization
- Scalable cloud hosting
- Automatic data synchronization
- Frontend: Angular 17 (Standalone Components)
- Backend: Firebase (Firestore, Authentication, Hosting)
- Styling: Tailwind CSS + Angular Material
- State Management: RxJS Observables
- Deployment: Firebase Hosting
- Node.js (v18 or higher)
- npm or yarn
- Firebase account
git clone <repository-url>
cd firebase-practice
npm installnpm run setup:firebaseThis interactive script will guide you through Firebase configuration.
npm run seed:dataThis adds sample restaurants with reviews to your database.
npm startVisit http://localhost:4200 to see your app!
# Development
npm start # Start development server
npm run build # Build for production
npm test # Run tests
# Firebase Setup
npm run setup:firebase # Interactive Firebase setup
npm run seed:data # Add sample restaurant data
npm run get:config # Get current Firebase config
# Security
npm run security:audit # Run security audit
npm run security:cleanup # Clean up code and remove console logs
npm run security:deploy-rules # Deploy Firestore security rules
# Deployment
npm run deploy # Build and deploy to Firebasesrc/
โโโ app/
โ โโโ models/ # Data models and interfaces
โ โโโ pages/ # Page components
โ โ โโโ home/ # Home page with search
โ โ โโโ restaurants/ # Restaurant listing with filters
โ โ โโโ auth/ # Authentication pages
โ โ โโโ add-restaurant/ # Add restaurant form
โ โ โโโ restaurant-detail/ # Restaurant detail page
โ โโโ services/ # Firebase services
โ โโโ shared/ # Shared components
โ โ โโโ rating/ # Rating component
โ โโโ environments/ # Environment configurations
โโโ assets/ # Static assets
โโโ styles/ # Global styles
scripts/ # Utility scripts
โโโ seed-data.js # Database seeding
โโโ security-audit.js # Security audit
โโโ code-cleanup.js # Code cleanup
โโโ setup-firebase.js # Firebase setup
- Firebase Authentication: Secure email/password authentication
- User-Specific Access: Users can only modify their own data
- Role-Based Permissions: Different access levels for authenticated vs anonymous users
- Secure Firestore Rules: Comprehensive validation and access control
- Input Validation: Client and server-side validation
- XSS Protection: Angular's built-in sanitization
- Automated Security Audit:
npm run security:audit - Code Cleanup:
npm run security:cleanup - Firestore Rules: Secure database access control
The app includes sample restaurants with realistic data:
- ๐ Pizza Palace - Italian, Moderate pricing
- ๐ฃ Sushi Express - Japanese, Expensive pricing
- ๐ Burger Joint - American, Budget pricing
- ๐ฎ Taco Fiesta - Mexican, Budget pricing
- ๐ฅข Golden Dragon - Chinese, Moderate pricing
- ๐ท French Bistro - French, Luxury pricing
- ๐ถ๏ธ Spice Garden - Indian, Moderate pricing
- ๐ Pasta House - Italian, Moderate pricing
- ๐ฅฉ Steak House - American, Expensive pricing
- ๐ Pho Palace - Vietnamese, Budget pricing
- Realistic restaurant information
- Operating hours for each day
- Price ranges (Budget/Moderate/Expensive/Luxury)
- Restaurant features (Delivery, Takeout, etc.)
- Sample reviews with ratings and comments
Update these files with your Firebase configuration:
src/environments/environment.ts
export const environment = {
production: false,
firebase: {
apiKey: "your-api-key",
authDomain: "your-project.firebaseapp.com",
projectId: "your-project-id",
storageBucket: "your-project.appspot.com",
messagingSenderId: "123456789",
appId: "your-app-id"
}
};npm run buildfirebase deploynpm run security:deploy-rules# Run security audit
npm run security:audit- Authentication (login/signup)
- Restaurant browsing and search
- Review system
- Responsive design
- Security features
"Permission denied" error
- Check Firestore security rules
- Verify Firebase configuration
- Ensure Firestore is enabled
"Firebase not initialized" error
- Verify environment files are updated
- Check Firebase configuration
- Restart development server
No data showing
- Run seed script:
npm run seed:data - Check browser console for errors
- Verify Firestore collections exist
Authentication not working
- Enable Email/Password in Firebase Console
- Check authentication configuration
- Verify Firebase project settings
- Optimized Bundle Size: Efficient code splitting
- Lazy Loading: Components loaded on demand
- Efficient Data Fetching: RxJS observables for real-time updates
- Static Site Generation: Fast loading with Firebase Hosting
- CDN Distribution: Global content delivery
- Color Scheme: Modern gradient design with orange/red theme
- Typography: Clean, readable fonts
- Layout: Card-based design with proper spacing
- Animations: Smooth hover effects and transitions
- Icons: Material Design icons for better visual appeal
- Responsive: Mobile-first design approach
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the existing issues
- Create a new issue with detailed information
- Contact the maintainers
Built with โค๏ธ using Angular 17 and Firebase
Last Updated: December 2024
Version: 1.0