This repository contains the codebase for the Marvel2 project. Marvel2 is a web application that allows users to explore and interact with Marvel Comics characters and comics. Feel free to review this repository.
The project is organized as follows:
📁marvel2
├── .env
├── .eslintrc.cjs
├── .gitignore
├── README.md
├── 📁__test__
│ ├── cardList.spec.ts
│ └── rootPage.spec.ts
├── index.html
├── package.json
├── 📁playwright-report
│ └── index.html
├── playwright.config.ts
├── pnpm-lock.yaml
├── 📁public
│ └── vite.svg
├── 📁src
│ ├── App.css
│ ├── App.tsx
│ ├── 📁assets
│ │ └── react.svg
│ ├── 📁components
│ │ ├── Lodaders.tsx
│ │ ├── 📁items
│ │ │ ├── ComicsList.tsx
│ │ │ └── Content.tsx
│ │ └── 📁navigation
│ │ ├── Navbar.tsx
│ │ └── Search.tsx
│ ├── 📁context
│ │ └── globalStateContext.tsx
│ ├── error-page.tsx
│ ├── 📁hooks
│ │ ├── useCharacters.tsx
│ │ ├── useComicsDetail.tsx
│ │ └── useSimplified.tsx
│ ├── index.css
│ ├── 📁interfaces
│ │ ├── cards.interface.ts
│ │ ├── characters.interface.ts
│ │ ├── comic.interface.ts
│ │ └── content.interface.ts
│ ├── main.tsx
│ ├── 📁routes
│ │ ├── CharacterDetails.tsx
│ │ ├── characterList.tsx
│ │ ├── favoriteList.tsx
│ │ └── root.tsx
│ ├── 📁services
│ │ ├── getAllCharacters.service.ts
│ │ ├── getCharacter.service.ts
│ │ └── getComic.service.ts
│ ├── 📁style
│ │ ├── HeartIcon.tsx
│ │ ├── Loader.css
│ │ ├── Logo.tsx
│ │ ├── SearchIcon.tsx
│ │ ├── UnselectedHeartIcon.tsx
│ │ └── components.module.scss
│ └── 📁utils
│ ├── characterDetail.ts
│ └── charactersList.ts
├── 📁test-results
├── tsconfig.json
├── tsconfig.node.json
└── vite.config.ts
- .env: Environment configuration file.
- .eslintrc.cjs: ESLint configuration file.
- .gitignore: Git ignore file.
- README.md: Project documentation.
- **test/**: Directory containing Playwright tests.
- index.html: HTML entry point for the application.
- package.json: npm package configuration file.
- playwright-report/: Directory containing Playwright test reports.
- playwright.config.ts: Playwright configuration file.
- pnpm-lock.yaml: Package lock file.
- public/: Directory containing public assets.
- src/: Source code directory.
- App.css: CSS file for the main application component.
- App.tsx: Main application component.
- assets/: Directory containing static assets.
- components/: Directory containing React components.
- Lodaders.tsx: Loader component.
- items/: Directory containing item components.
- navigation/: Directory containing navigation components.
- context/: Directory containing React context components.
- error-page.tsx: Error page component.
- hooks/: Directory containing custom React hooks.
- index.css: CSS file for index.html.
- interfaces/: Directory containing TypeScript interfaces.
- main.tsx: Main entry point for the React application.
- routes/: Directory containing React router components.
- services/: Directory containing service functions.
- style/: Directory containing styled components.
- utils/: Directory containing utility functions.
- test-results/: Directory containing test result files.
- tsconfig.json: TypeScript configuration file.
- tsconfig.node.json: TypeScript configuration file for Node.js.
- vite.config.ts: Vite configuration file.
- Clone the repository.
- Install dependencies using
npm install
orpnpm install
.
- First validate if you have the .env file in the root folder (if not, please, create the file and add the required variables).
- Run the application using
npm dev
orpnpm dev
. - Go to
localhost:5173
or just click in the url the terminal provide.
- Go to Marvel 2 app
- Start using.
- Open a second terminal and run the
npm dev
orpnpm dev
command (this is required to run the all the tests), - After you were ran the previous comand open other terminal tab and run the follow tests using
npm test
(this runs a terminal script then generate a report). - Access Playwright test reports in
playwright-report/
directory.
Note: If after finishing the test does not redirect you to the report page, please type this command in the terminal: pnpm exec playwright show-report
Sergio Campbell Dev
Thanks for visit this repository 😊