A modern web application for managing movies and sharing reviews, built with React 19, Vite, and Tailwind CSS 4.
- User Authentication: Secure login and registration with role-based access control.
- Movie Management:
- Browse a collection of movies with search and pagination support.
- View detailed information for each movie.
- Add new movies easily using their IMDb ID.
- Delete movies (restricted to administrative roles).
- Review System:
- Rate and review movies to share your thoughts.
- Manage your reviews by deleting them if needed.
- Protected Routes: Secure navigation using permission-based guards.
- State Management: Persistent authentication state using Zustand.
- Responsive Design: Styled with Tailwind CSS 4 for a seamless experience across devices.
- Framework: React 19
- Build Tool: Vite
- Styling: Tailwind CSS 4
- State Management: Zustand
- Data Fetching: SWR & Axios
- Routing: React Router 7
- Language: TypeScript
- Node.js (Latest LTS recommended)
- pnpm (Package Manager)
-
Clone the repository:
git clone <repository-url> cd behemoth-react-fe
-
Install dependencies:
pnpm install
-
Development Server: Start the application in development mode:
pnpm dev
Open http://localhost:5173 in your browser.
-
Build for Production:
pnpm build
The application currently points to a backend API at http://localhost:7080. You can modify this in src/api/intance.ts.
- Build the Docker image:
docker build -t localhost:5000/behemoth-react-fe . - Run the Docker image:
docker run -d -p 8080:80 --name behemoth-react-fe localhost:5000/behemoth-react-fe
- Tips: run the development server on docker container
docker run --rm -v $(pwd):/app -w /app -p 5173:5173 node:lts-alpine sh -c "npm install &&npm run dev -- --host 0.0.0.0"
- Tips: run the development server with makefile (make sure you have installed makefile)
make install make dev make build
src/
├── api/ # Axios instances and API service modules
├── assets/ # Static assets like images and icons
├── components/ # Reusable UI components (Modals, Navbars, etc.)
├── pages/ # Main application views/pages
├── routes/ # Routing configuration and definitions
├── store/ # Global state management (Zustand)
└── App.tsx # Main application entry point
pnpm dev: Runs the app in development mode.pnpm build: Builds the app for production.pnpm lint: Lints the codebase using ESLint.pnpm preview: Previews the production build locally.
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.