Skip to content

AlexanderJDupree/Battleship

Repository files navigation

⚓ Battleship

playbattleship.com is a full-stack web application for playing the classic strategy game, Battleship, in the browser. This application was developed as part of the Full-Stack Web Development course at Portland State University.

Built With

Getting Started

Before we can setup the project locally we need to install some dependencies.

With the prerequisites dealt with, we can clone the repo and install the project:

git clone https://github.com/AlexanderJDupree/Battleship
cd Battleship
yarn install

Usage

See the package.json file for a full list of commands but the primary commands we will use are:

  • Build the common library, always run this first
    yarn run build-common
  • Run the client development server with live reloading at localhost:3000
    yarn run client
  • Run the Battleship websockets server with live reloading at localhost:8080.
    yarn run server
  • Run both client and server concurrently
    yarn start
    

What's in this Repo?

.
├───.github             <-- CI stuff
│   └───workflows
|
├───client              <-- React application frontend
│   ├───public              <-- Static assets
│   └───src
│       ├───components      <-- Reusable React components
│       ├───contexts        <-- Shareable data between components
│       ├───pages           <-- Main routes for the site
│       ├───styles          <-- Site and individual css themes
│       └───utils           <-- Utility functions
|
├───common              <-- Server/Client shared code e.g. Game logic, event types
│   └───lib
├───docs                <-- Documentation
|
└───server              <-- Battleship express server
    └───src

Misc

Recommended VScode extensions for development: