NCKU Eater 2.0 is a food recommendation app that simplifies the process of discovering local dining options in Tainan.
- Random Food Recommendations: Click the "Lottery" button to receive a random food suggestion, perfect for indecisive users.
- Advanced Filters: Easily filter restaurants by vegetarian options or Tainan's famous beef soup.
- Favorites Management: Save your favorite restaurants to a personalized "Favorites" list for quick access.
- Built with Next.js to enhance performance and user experience.
- Implements multiple authentication methods using next-auth, including Credentials and OAuth (GitHub, Google).
- Validates login and registration forms using react-hook-form and zod.
- Protects against XSS attacks by using DOMPurify to sanitize user-generated content.
- Utilizes TypeScript for type definitions, improving code maintainability and security.
- Utilizes Redux Toolkit (RTK) to efficiently manage and streamline global application state.
- Designs the user interface with Shadcn/ui and Tailwind CSS.
- Stores user data in MongoDB Atlas.
- Integrates Google Sheets API as a restaurant database, allowing for easy online editing and updating of restaurant information to ensure real-time accuracy and accessibility.
Demo Test Account:
- Email: test@test.com
- Password: test1234
Follow these steps to clone and run the project locally:
git clone https://github.com/70928manson/NCKU-food-draw.git
cd ncku-eater-2.0
Create a .env file in the root directory of the project. Use the provided .env.example file as a reference to fill in the required environment variables.
cp .env.example .env
Open the .env file and configure the necessary environment variables, such as database credentials, OAuth client secrets, and any other configuration needed for the application.
For this repository, the environment variables is for mongodb, next-auth (basic, google and github provider), google sheet api
Go to Github Develop Setting, register your OAuth Apps, and set up the callback URL to match your local development environment
http://localhost:3000/ or http://127.0.0.1:3000/
Go to Google Cloud Console build new repo, and search "Enabled APIs & Services" register OAuth, set up the callback URL
http://localhost:3000/api/auth/callback/google
Run the following command to install all required dependencies:
npm install
Start the development server with:
npm run dev
Visit http://localhost:3000 to view the application in action.
-
Ensure you have Node.js and npm installed. If not, you can download and install them from Node.js official website.
-
For detailed configuration or troubleshooting, refer to the OAuth provider's documentation. If you encounter any issues, feel free to contact me or open an issue in the repository.
The Google Sheet for managing store data can be found at the following link:
You are welcome to edit or add new entries to the sheet. Your contributions are greatly appreciated!