A comprehensive web application for managing store ratings with role-based access control. Users can sign up, browse stores, submit ratings, and manage their accounts. Admins can manage users and stores, while store owners can view their ratings and performance metrics.
- User registration with email and password
- Role-based login (Admin, Normal User, Store Owner)
- Secure session management
- Form validation with real-time error messages
- Admin Dashboard: Manage users and stores, view system statistics
- Normal User Dashboard: Search stores, submit/update ratings, view store details
- Store Owner Dashboard: View store information, ratings, and performance metrics
- Browse available stores with filtering
- View store ratings and review counts
- Submit 1-5 star ratings
- Update previous ratings
- Name: 20-60 characters
- Email: Valid email format
- Address: Max 400 characters
- Password: 8-16 characters (requires uppercase letter and special character)
- Ratings: 1-5 scale
- Node.js (v18 or higher)
- npm or yarn package manager
-
Clone or download the project ```bash
git clone cd store-rating-app ```
-
Install dependencies ```bash npm install
yarn install ```
Development Mode: ```bash npm run dev
yarn dev ```
The application will start at http://localhost:3000
Production Build: ```bash npm run build npm start
yarn build yarn start ```
- Email: admin@example.com
- Password: Admin@1234
- Email: john@store.com
- Password: Owner@1234
-
Email: user1@example.com
-
Password: User@1234
-
Email: user2@example.com
-
Password: User@1234
You can create a new account by clicking "Sign Up" on the login page. Fill in all required fields:
- Name (20-60 characters)
- Email (valid email format)
- Address (max 400 characters)
- Password (8-16 characters, with uppercase letter and special character)
After successful signup, you can immediately log in with your credentials.
``` store-rating-app/ ├── app/ │ ├── page.tsx # Main app logic and routing │ ├── layout.tsx # Root layout │ └── globals.css # Global styles ├── components/ │ ├── login-form.tsx # Login component │ ├── signup-form.tsx # Registration component │ ├── admin-dashboard.tsx # Admin interface │ ├── user-dashboard.tsx # Normal user interface │ └── store-owner-dashboard.tsx # Store owner interface ├── lib/ │ ├── types.ts # TypeScript interfaces │ ├── store.ts # Initial data │ └── validation.ts # Form validation functions └── README.md # This file ```
- Frontend Framework: Next.js with React
- Styling: Tailwind CSS
- Language: TypeScript
- State Management: React Hooks
- UI Components: shadcn/ui
- Sign up or log in with your credentials
- Search for stores by name or address
- View store ratings and your previous ratings
- Submit or update ratings (1-5 stars)
- Log out when finished
- Log in with your store owner credentials
- View your store information and statistics
- Check your average rating and total ratings count
- View recent ratings from users
- Monitor store performance
- Log in with admin credentials
- Manage users: search, view, and add new users
- Manage stores: view all stores and their ratings
- View system statistics including total users and stores
- Access complete user information
All forms include comprehensive validation:
- Email format checking
- Password strength requirements
- Character length limits
- Real-time error messages
- 1-5 star rating scale
- Update existing ratings
- Track rating history
- View average ratings per store
- Search stores by name or address
- Filter users by name and email
- Real-time search results
- All data is stored in the browser's React state and will be reset on page reload
- For persistent data storage, integrate with a backend database (Supabase, Firebase, etc.)
- User sessions are maintained during the browser session only
- Backend database integration (Supabase, PostgreSQL)
- Email verification for new accounts
- Password reset functionality
- Store images and detailed descriptions
- User reviews and comments on ratings
- Pagination for large data sets
- Export data functionality for admins
For issues or questions about the application, please refer to the component files in the components/ directory for implementation details.
Created with Next.js and Tailwind CSS