Marvel-Flix is a web application that allows users to browse and view information about movies in the Marvel Cinematic Universe. The application was built using React, React Router, and Bootstrap, and it consumes my own RESTful API to retrieve movie data.
- Features
- Technologies Used
- Getting Started
- File Structure
- Code Explanation
- Future Improvements
- Contributing
- License
- Browse a list of Marvel movies with detailed information about each movie, including its title, description, genre, director, and more.
- Search for movies by title.
- View detailed information about a specific movie, including a synopsis, director information, and genre details.
- User authentication and authorization, allowing users to log in, sign up, and manage their account information.
- Ability for users to mark movies as their favorites and view their favorite movies on their profile page.
- React: A JavaScript library for building user interfaces.
- React Router: A library for handling client-side routing in React applications.
- React Bootstrap: A popular UI library for building responsive and mobile-first websites with React.
- Prop Types: A library for type checking React components' props.
- Node.js (version 14 or higher)
- npm (version 6 or higher)
- Clone the repository:
git clone https://github.com/your-username/marvel-flix.git
- Change to the project directory:
cd marvel-flix
- Install the dependencies:
npm install
- Start the development server:
npm start
- Open your web browser and navigate to
http://localhost:1234
.
To test the Marvel-Flix application, you can use the following credentials:
- Username: Manuel
- Password: 11111
Once logged in, you can explore the various features of the application.
The project's file structure is as follows:
marvel-flix/
├── public/
├── src/
│ ├── components/
│ │ ├── movie-card/
│ │ ├── movie-view/
│ │ ├── navigation-bar/
│ │ ├── login-view/
│ │ ├── signup-view/
│ │ └── profile-view/
│ ├── utils/
│ ├── App.js
│ └── index.js
├── .gitignore
├── package.json
├── package-lock.json
└── README.md
The main components of the application are:
MainView
: The main component that handles routing and rendering the appropriate views based on the user's navigation.MovieCard
: A reusable component that displays a single movie's information in a card format.MovieView
: A component that displays detailed information about a specific movie.NavigationBar
: A component that handles the application's navigation, including the search functionality.LoginView
andSignupView
: Components that handle user authentication and authorization.ProfileView
: A component that displays the user's profile information and allows them to manage their favorite movies.
The application fetches movie data from a RESTful API using the fetch
function. The API endpoint is https://marvel-flix-c3644575f8db.herokuapp.com/movies
, and the application includes the necessary authorization headers to access the data.
The application uses React's built-in state management system to handle the state of various components, such as the list of movies, the selected movie, the user's authentication status, and the user's favorite movies.
The application uses React Router to handle client-side routing. The main routes include /movies
, /movies/:movieId
, /login
, /signup
, and /users/profile
.
- Implement user reviews and ratings for movies.
- Add the ability to sort and filter movies based on various criteria (e.g., release date, genre, director).
- Enhance the user profile page to allow users to update their personal information and manage their favorite movies more easily.
- Improve the overall design and user experience of the application.
- Implement a more robust error handling and feedback system for the API requests.
If you would like to contribute to the development of Marvel-Flix, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive commit messages.
- Push your changes to your forked repository.
- Submit a pull request to the main repository.
This project is licensed under the MIT License.