• Stars
    star
    1
  • Language
    TypeScript
  • License
    Other
  • Created about 1 year ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Star Wars Frontend

This is a Star Wars App that uses ViteJS, and TypeScript. This app consumes the Star Wars Backend API

Showcase

Watch the video

Prerequisites

Before running the application, make sure you have the following installed:

  • Node.js (v20 or later)
  • yarn (v1.22.19 or later)

Getting Started

Follow the steps below to get the application up and running on your local machine:

  1. Clone the repository:

    git clone https://github.com/vinibispo/starwars-frontend.git
  2. Navigate to the project directory:

    cd starwars-frontend
  3. Install the dependencies:

    yarn --frozen-lockfile
  4. Start the development server:

    yarn dev

    This will start the development server and your app will be accessible at http://localhost:5173.

Available Scripts

In the project directory, you can run the following scripts:

  • yarn dev: Starts the development server.
  • yarn build: Builds the production-ready app in the dist directory.
  • yarn preview: Serves the production build locally for testing.
  • yarn lint: Runs the ESLint linter to check for code issues.
  • yarn type-check: Runs the TypeScript Check for code issues.

Project Structure

The project structure follows the standard setup of a ViteJS project with TypeScript:

โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ public
โ”‚ย ย  โ””โ”€โ”€ _redirects
โ”œโ”€โ”€ src
โ”‚ย ย  โ”œโ”€โ”€ app.tsx
โ”‚ย ย  โ”œโ”€โ”€ assets
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ background.jpg
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ character.svg
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ film.svg
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ planet.png
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ planet.svg
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ star-wars-theme-song.mp3
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ star.svg
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ wallpaper.png
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ wars.svg
โ”‚ย ย  โ”œโ”€โ”€ hooks
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ characters.ts
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ films.ts
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ planets.ts
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ user.ts
โ”‚ย ย  โ”œโ”€โ”€ main.tsx
โ”‚ย ย  โ”œโ”€โ”€ pages
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ characters
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ id.tsx
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ index.tsx
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ films
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ id.tsx
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ index.tsx
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ home
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ index.tsx
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ planets
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ id.tsx
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ index.tsx
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ users
โ”‚ย ย  โ”‚ย ย      โ”œโ”€โ”€ forgot-password.tsx
โ”‚ย ย  โ”‚ย ย      โ”œโ”€โ”€ reset-password.tsx
โ”‚ย ย  โ”‚ย ย      โ”œโ”€โ”€ shared
โ”‚ย ย  โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ form.ts
โ”‚ย ย  โ”‚ย ย      โ”œโ”€โ”€ signin.tsx
โ”‚ย ย  โ”‚ย ย      โ””โ”€โ”€ signup.tsx
โ”‚ย ย  โ”œโ”€โ”€ resources
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ api.ts
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ schema
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ characters.ts
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ films.ts
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ planets.ts
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ user.ts
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ storage.ts
โ”‚ย ย  โ”œโ”€โ”€ router.tsx
โ”‚ย ย  โ”œโ”€โ”€ shared
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ card.tsx
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ contexts
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ auth-context.tsx
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ layout.tsx
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ navbar.tsx
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ pagination
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ arrow-left.tsx
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ arrow-right.tsx
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ index.tsx
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ styles.ts
โ”‚ย ย  โ”œโ”€โ”€ ui
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ container.ts
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ sign-in.tsx
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ styles
โ”‚ย ย  โ”‚ย ย      โ”œโ”€โ”€ global.ts
โ”‚ย ย  โ”‚ย ย      โ””โ”€โ”€ sign-out.tsx
โ”‚ย ย  โ””โ”€โ”€ vite-env.d.ts
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ tsconfig.node.json
โ”œโ”€โ”€ vite.config.ts
โ””โ”€โ”€ yarn.lock

You can modify and extend the project structure to suit your needs.

Learn More

To learn more about the technologies used in this project, refer to the official documentation:

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.