GithubHelp home page GithubHelp logo

star-wars-catalog's Introduction

StarWars Project

This project is a web application that provides detailed information about characters, planets, and starships from the Star Wars universe. It is built with a MERN stack.

Table of Contents

Project Structure

The project is structured as follows:

.
├── client
│   └── my-app
│       ├── package.json
│       ├── package-lock.json
│       ├── public
│       │   └── index.html
│       ├── README.md
│       └── src
│           ├── App.css
│           ├── App.js
│           ├── components
│           │   ├── Pagination.css
│           │   ├── Pagination.js
│           │   ├── PersonDetail.css
│           │   ├── PersonDetail.js
│           │   ├── PersonList.css
│           │   ├── PersonList.js
│           │   ├── PlanetDetail.css
│           │   ├── PlanetDetail.js
│           │   ├── PlanetList.css
│           │   ├── PlanetList.js
│           │   ├── SearchComponent.css
│           │   ├── SearchComponent.js
│           │   ├── StarshipDetail.css
│           │   ├── StarshipDetail.js
│           │   ├── StarshipList.js
│           │   └── StarshipsList.css
│           ├── index.css
│           └── index.js
├── package.json
├── package-lock.json
├── project_structure.txt
├── README.md
└── server
    ├── models
    │   ├── Person.js
    │   ├── Planet.js
    │   └── Starships.js
    ├── routes
    │   ├── person.js
    │   ├── planets.js
    │   ├── search.js
    │   └── starships.js
    └── server.js

Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/temirlan-k/star-wars-catalog
    cd star-wars-catalog
  2. Install dependencies for both client and server:

    cd client/my-app
    npm install
    cd ../../server
    npm install
  3. Create a .env file in the server directory and add your environment variables (e.g., for MONGODB connection).

Usage

To start the application, run the following commands in separate terminals:

  1. Start the server:

    cd server
    node server.js
  2. Start the client:

    cd client/my-app
    npm start

The application will be available at http://localhost:3000 - front and http://localhost:5000 - back.

API Endpoints

The backend API provides the following endpoints:

  • GET /api/people: Get a list of all characters.
  • GET /api/people/:id: Get details of a specific character.
  • GET /api/planets: Get a list of all planets.
  • GET /api/planets/:id: Get details of a specific planet.
  • GET /api/starships: Get a list of all starships.
  • GET /api/starships/:id: Get details of a specific starship.
  • GET /api/search: Search for characters, planets, and starships.

Components

The frontend React application includes the following components:

  • App.js: The main component that sets up routing.
  • PersonList.js: Displays a list of characters.
  • PersonDetail.js: Displays details of a specific character.
  • PlanetList.js: Displays a list of planets.
  • PlanetDetail.js: Displays details of a specific planet.
  • StarshipList.js: Displays a list of starships.
  • StarshipDetail.js: Displays details of a specific starship.
  • SearchComponent.js: Provides search functionality.
  • Pagination.js: Handles pagination for lists.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes. Ensure that your code adheres to the project's coding standards and includes appropriate tests.

License

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

star-wars-catalog's People

Contributors

temirlan-k avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.