This app builded with:
And already deployed on Vercel - https://sea-cinema-phi.vercel.app/
- Home page: show all movies
- Login page: login with username and password
- Register page: register with full name, username, age, and password
- Movie detail page: show movie detail and show time
- Book ticket: this feature only available for logged in user in detail movie page
- Balance: this feature only available for logged in navbar
- Top up Balance: this feature available in balance menu
- Withdraw Balance: this feature available in balance menu
- My ticket: this feature only available for logged in navbar
- Withdraw ticket: this feature only available for logged in my ticket menu
- Logout: this feature only available for logged in navbar
- Not all movies have show time
- Clone the repo
git clone https://github.com/farhan15r/sea-cinema.git
- Install NPM packages
npm install # or yarn install # or pnpm install
- Copy .env.example to .env
cp .env.example .env
- Fill the .env file with your mongoDB cluster connection string
- Fill the ACCESS_TOKEN_KEY and REFRESH_TOKEN_KEY with your own secret key
- Set the ACCESS_TOKEN_AGE and REFRESH_TOKEN_AGE with your own token age
- open src\lib\service\mongo\MoviesService.js
- uncomment line 13
- run the app
- the dummy movie will be filled after you open the home page (http://localhost:3000), this is running when app getting movies data from API (https://localhost:3000/api/movies)
IMPORTANT: don't forget to comment line 13 again after you filled the database with dummy movie
-
run the development server:
npm run dev # or yarn dev # or pnpm dev
-
Open http://localhost:3000 with your browser to see the result.
- open src\lib\service\mongo\ShowTimesService.js
- go to line 102 you will see dummy function
- adjust the movieID, date, and time. You can get movieID in url when you open the movie detail page (http://localhost:3000/movie/[movieID])
- uncomment line 14
- run the app and open the movie detail page (http://localhost:3000/movie/[movieID])
IMPORTANT: don't forget to comment line 14 again after you filled the database with dummy movie show time
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!