Skip to content
This repository has been archived by the owner on Jun 5, 2021. It is now read-only.

floric/secret-clan

Repository files navigation

Secret Clan

Based on another similiar, famous game we decided to create a small Webapp for fun.

Structure

├── backend | Backend based on Warp (Rust)
│   ├── Cargo.lock
│   ├── Cargo.toml
│   └── src
├── frontend | Frontend based on Svelte and Tailwind (TS, HTML, JS)
|   ├── public
│   ├── src
│   ├── package.json
│   ├── postcss.config.js
│   ├── tailwind.config.js
│   ├── webpack.config.js
│   └── package-lock.json
├── docker-entrypoint.sh
├── Dockerfile
├── Makefile
└── README.md

Commands

Development

Run the following commands only the first time or if new dependencies were added:

cd frontend
npm install
npm run build

cargo install cargo-watch

After that, start development with two terminals and the following commands:

make watch-fe and make watch-be

This will start watch modes for the server and frontend and will automatically update the code and restart the server. The update process is visible in the terminal output.

Run the backend tests with the following command and also update the coverage report:

make test-be (Note, that this command requires Tarpaulin; alternatively simply use cargo test)

Production Build

Run the following command to create the Docker image with the full app:

make build

Run the following command to start the image created previously. This will start the server and the application should be available on localhost:3333. Use the environment variables to change the host or other settings.

make run

Necessary tools

Frontend: Node 14, preferred installation with NVM

Backend: Rust, Cargo Watch, Tarpaulin, Criterion

General: Docker Desktop

IDE

We recommend to use VSCode for Frontend and Backend with the following extensions enabled:

  • rust-analyzer
  • crates
  • Better TOML / TOML Language Support
  • npm
  • Tailwind CSS IntelliSense
  • ESLint
  • Svelte for VSCode

Technologies

Frontend

Svelte Tailwind CSS

Backend

Warp

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published