Code Monkey home page Code Monkey logo

cyber-city-sim's Introduction

CyberCitySim

A game-type project developed as an academic endeavour during our studies on WUST (PL).

Table of Contents:


1. Model

All model classes and interfaces are defined in the model directory.
For example all errors that can occur are defined as an enum in model/errors.ts.


2. Client application program

The source files are in the client directory.

The front-end application is an Angular application built using @angular/cli.

Before running the program, you need to have the Angular CLI program installed globally in your system (use npm install -g @angular/cli). For some reason Angular CLI installed locally can’t be run.

To run the program in development mode use

npm run dev

whilst being in the client directory.


3. Server application program

The source files are in the server directory.

The back-end application is an Express.js (with TypeScript) application.

To run the program in development mode use

npm run dev

whilst being in the server directory.

3.1. Database

To initialize the database with empty schemas run

./init.sh

whilst being inside the server/database directory.


3.2. Auxiliary classes

The application is using a few wrapper classes (located in server/src/auxiliary) that ensure type safety across the whole program.

Instead of using the standard Express.Router class for setting up routes here we use RouterWrapper that is the type-safe medium between our program and the Express Router API.


3.3. Error Handling

The program uses Promise-based errors which means when an Error is thrown Express will catch it. The error handler is defined in server/src/index.ts while all error types are defined in model/errors.ts as told in «Model».


cyber-city-sim's People

Contributors

jerry-sky avatar kamilmatejuk avatar ababiarz avatar deatomizeer avatar

Watchers

 avatar  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.