Skip to content

A streamlined movie management system designed to organize and track movie collections with ease. Features include movie cataloging, search functionality, and user-friendly interfaces for adding, editing, and categorizing films by title, genre, release year, and more, ideal for personal or small-scale theater use.

Notifications You must be signed in to change notification settings

monster0318/movie-manage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Movie-Manage

Welcome to the Movie-Manage, a full-stack, lightweight, and simple movie application built using Next.js with both backend and frontend integrated seamlessly.

This project shows the power of Next.js and serves as a practical demonstration of using Next.js as a complete full-stack framework, incorporating authentication, dark mode, and local storage for data persistence.

Table of Contents

🌟 Features

  • Full-stack application with Next.js for both frontend and backend
  • Full authentication system (Register and Login)
  • User-specific Movie lists with graceful design
  • CRUD operations for movie items
  • Mysql database for data storage
  • Responsive design
  • Add, edit, delete movies
  • State management using Zustand
  • Localization with i18n(En, Fr)
  • Form Validation with zod (email, password, movie title, pusblishing year)
  • Simple pagination with no library
  • API documentation using swagger
  • A clean, modern, and responsive UI
  • Basic testing for API endpoints and utility functions
  • Easy-to-understand file structure and codebase
  • Customizable with additional features and improvements

πŸš€ Live Deployment

The application is deployed live on Vercel. You can access it at http://ec2-54-153-82-108.us-west-1.compute.amazonaws.com:3000/.

The app features a landing page, authentication (login, register), a movie list, and a Swagger API documentation page.

πŸ“‚ File Structure

Below is the comprehensive file structure for the project:

movie-manage/                                                                          
β”œβ”€ app/                                        # Backend API endpoints                                        
β”‚  β”œβ”€ api/                                                                             
β”‚  β”‚  β”œβ”€ auth/                                                                         
β”‚  β”‚  β”‚  β”œβ”€ register/                                                                  
β”‚  β”‚  β”‚  β”‚  └─ route.ts                        # Registration route                                       
β”‚  β”‚  β”‚  └─ [...nextauth]/                                                             
β”‚  β”‚  β”‚     └─ route.ts                        # Login route                                       
β”‚  β”‚  β”œβ”€ movies/                               # Full CRUD operations for movies                                        
β”‚  β”‚  β”‚  β”œβ”€ [id]/                                                                      
β”‚  β”‚  β”‚  β”‚  └─ route.ts                                                               
β”‚  β”‚  β”‚  └─ route.ts                                                                  
β”‚  β”‚  └─ upload/                               # File Upload route                                       
β”‚  β”‚     └─ route.ts                                                                  
β”‚  β”œβ”€ docs/                                    # Swagger documentation page                                        
β”‚  β”‚  β”œβ”€ layout.tsx                                                                   
β”‚  β”‚  └─ page.tsx                                                                     
β”‚  β”œβ”€ [locale]/                                # Page localization                                         
β”‚  β”‚  β”œβ”€ auth/                                 # Authentication pages                                        
β”‚  β”‚  β”‚  β”œβ”€ login/                                                                     
β”‚  β”‚  β”‚  β”‚  └─ page.tsx                        # Login page                                      
β”‚  β”‚  β”‚  └─ register/                                                                  
β”‚  β”‚  β”‚     └─ page.tsx                        # Register page                                       
β”‚  β”‚  β”œβ”€ movies/                               # Movie management pages                                         
β”‚  β”‚  β”‚  β”œβ”€ add/                                                                       
β”‚  β”‚  β”‚  β”‚  └─ page.tsx                                                               
β”‚  β”‚  β”‚  β”œβ”€ edit/                                                                      
β”‚  β”‚  β”‚  β”‚  └─ [id]/                                                                   
β”‚  β”‚  β”‚  β”‚     └─ page.tsx                                                            
β”‚  β”‚  β”‚  β”œβ”€ empty/                                                                     
β”‚  β”‚  β”‚  β”‚  └─ page.tsx                                                               
β”‚  β”‚  β”‚  └─ page.tsx                                                                  
β”‚  β”‚  └─ layout.tsx                            # Root Layout Component                                       
β”‚  β”œβ”€ favicon.ico                                                                     
β”‚  β”œβ”€ globals.css                                                                     
β”‚  └─ providers.tsx                                                                   
β”œβ”€ components/                                 # UI components                                        
β”‚  β”œβ”€ Moives/                                                                          
β”‚  β”‚  └─ LanguageSwitcher.tsx                  # Language Switch bar                                       
β”‚  β”œβ”€ ui/                                                                              
β”‚  β”‚  β”œβ”€ CustomizedCheckbox.tsx                                                       
β”‚  β”‚  β”œβ”€ fileupload.tsx                                                               
β”‚  β”‚  └─ ImageCard.tsx                                                                
β”‚  └─ Footer.tsx                                                                      
β”œβ”€ hooks/                                                                              
β”‚  └─ useWindowResize.ts                       # Hook windows size event                                       
β”œβ”€ i18n/                                                                               
β”‚  β”œβ”€ request.ts                                                                      
β”‚  └─ routing.ts                                                                      
β”œβ”€ lib/                                        # User defined library                                        
β”‚  β”œβ”€ prisma.ts                                # Prisma  config                                      
β”‚  β”œβ”€ swagger.ts                               # Swagger config                                        
β”‚  └─ zod.ts                                   # Zod validation config                                       
β”œβ”€ messages/                                   # Messages for localization                                        
β”‚  β”œβ”€ en.json                                                                         
β”‚  └─ fr.json                                                                         
β”œβ”€ prisma/                                     # Prisma configuration dir                                        
β”‚  β”œβ”€ migrations/                                                                      
β”‚  └─ schema.prisma                                                                   
β”œβ”€ public/                                                                             
β”‚  β”œβ”€ uploads/                                                                                                                   
β”‚  β”œβ”€ Vector1.svg                                                                     
β”‚  └─ Vector2.svg                                                                     
β”œβ”€ store/                                      # zustand stores                                        
β”‚  β”œβ”€ authStore.ts                             # Authentication state store                                       
β”‚  β”œβ”€ movieStore.ts                            # Moive management store                                       
β”‚  └─ useStore.ts                              # Mobile state store                                       
β”œβ”€ eslint.config.mjs                           # ESLint configuration                                        
β”œβ”€ middleware.tsx                              # API middleware                                       
β”œβ”€ next.config.ts                              # Next.js configuration                                       
β”œβ”€ package-lock.json                           # Locked versions of dependencies                                       
β”œβ”€ package.json                                # Project dependencies and scripts                                       
β”œβ”€ postcss.config.js                           # Postcss configuration                                       
β”œβ”€ README.md                                   # This README file                                       
β”œβ”€ tailwind.config.ts                          # Tailwind CSS configuration                                       
└─ tsconfig.json                               # TypeScript configuration                                       

πŸ“‹ API Endpoints

Here's a table listing all the API endpoints provided by this application:

HTTP Method Endpoint Description
POST /api/auth/login Log in with email and password
POST /api/auth/register Register a new user
GET /api/movies Fetch all movies for a user
POST /api/movies Create a new movie item
PUT /api/movies/{id} Update a movie item
DELETE /api/movies/{id} Delete a movie item
POST /api/upload Upload image file

πŸ› οΈ Getting Started

Follow this step-by-step guide to set up the project locally.

1. Prerequisites

Ensure you have the following installed:

2. Clone the Repository

git clone https://github.com/monster0318/movie-manage.git
cd movie-manage

3. Install Dependencies

If you're using npm:

npm install --legacy-peer-deps  # because swagger-jsdoc latest version is compatible with only react 18 not 19

Or, if you're using Yarn:

yarn install

4. Set Up Environment Variables

Create a .env.local file in the root directory if any environment variables are required. (Currently, the project doesn't use any external services that require environment variables).

5. Run the Development Server

Start the development server:

npm run dev

Or, if using Yarn:

yarn dev

The application should now be running at http://localhost:3000.

6. Build for Production

To build the project for production, run:

npm run build

Or, if using Yarn:

yarn build

To start the production server:

npm run start

Or:

yarn start

The production build will be served at http://localhost:3000.

🌐 Using the App

  1. Visit the Landing Page (/): Introduces the app with the option to log in or register.
  2. Authentication:
  • Register: Create a new account via the /auth/register page.
  • Login: Access your account through the /auth/login page.
  1. Manage movies: Access the main movie list page (/) where you can add, edit, and delete movies

Alternatively, you can directly access the deployed application at http://ec2-54-153-82-108.us-west-1.compute.amazonaws.com:3000/.

πŸ“ Swagger API Documentation

The application includes a Swagger API documentation page that lists all the available API endpoints and their descriptions. You can access the Swagger documentation at /docs.

For example: http://ec2-54-153-82-108.us-west-1.compute.amazonaws.com:3000/docs

πŸ’‘ Notes

  • This application uses local storage to manage user data and movie items. For a more robust application, consider integrating a real database (e.g., Mysql, PostgreSQL).

πŸ§ͺ Testing

Running Tests

This project includes a few basic tests for the API endpoints and utility functions. To run the tests, use the following command:

npm run test

Or, if using Yarn:

yarn test

The tests will run and display the results in the terminal.

πŸ“ License

This project is licensed under the MIT License. See the LICENSE file for more information.

πŸ“§ Contact

For any inquiries or feedback, feel free to reach out to the author at loyalman318@gmail.com.

Enjoy using the Movie-Manage! πŸŽ‰


Happy coding! πŸš€

Back to Top ↑

About

A streamlined movie management system designed to organize and track movie collections with ease. Features include movie cataloging, search functionality, and user-friendly interfaces for adding, editing, and categorizing films by title, genre, release year, and more, ideal for personal or small-scale theater use.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published