Code Monkey home page Code Monkey logo

csgo-stratbook's Introduction

Web & Desktop application to collaboratively manage strategies & utilities in Valve's popular competitive FPS Counterstrike: Global Offensive

Live Version here!

Features

✅ Add & manage your team

✅ Add & manage strats

✅ Add & manage utilities

✅ Link teammates & utilities in the powerful strat editor

✅ Teammates see changes in real-time

✅ Real-time tactics board to plan out strategies

Table of Content

Technologies

Client/Frontend

  • Vue 2
  • Vue CLI
  • Vuex
  • Vue Class Components & Property Decorator
  • Electron
  • Typescript
  • Socket.io-Client
  • SCSS
  • Konva

Server/Backend

  • Node.js
  • Express
  • MongoDB/Mongoose
  • Socket.io
  • Bcrypt
  • JWT

Landingpage

  • Nuxt (SSG)
  • Nuxt Class Components

Get started (local setup)

Server + Client (Docker)

Server (Local)

  • Navigate to the /server directory
  • Run npm i to install a ll dependencies
  • Create an .env file and add the required environment variables documented here
  • Run npm run serve to start the server in development mode

Client (Local)

  • Navigate to the /client directory.
  • Run npm i to install all dependencies
  • Run npm run serve to serve the web client in development mode with HMR

Windows Desktop Client (Local)

  • Navigate to the /client directory.
  • Download GTK and extract to "C:\GTK"
  • Run npm i to install all dependencies
  • Run npm run electron:serve to start the app in development mode with HMR
  • Run npm run electron:build to build a windows installer

csgo-stratbook's People

Contributors

dependabot[bot] avatar itsclemi avatar jh1ller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

csgo-stratbook's Issues

Roles & Permission System

Team managers have granular control on who can edit strats, utilities, etc.
This could be extended to control all CRUD operations individually.
Permissions are grouped into roles.

Current state:

  • 2 Roles (Team manager & normal user)
  • Only team manager can edit team details & kick players

Planned state:

  • More roles (maybe maintainable by team manager)
  • Roles have different permissions for:
    • Add, delete, edit strat
    • Add, delete, edit utility
    • Edit team
    • Kick players
    • Lock strats (see #8)
    • Have badges (maybe even custom made ones)

SVGs Not Properly Displayed When Selected as Team Logo

Describe the bug
When an SVG file is selected as a team logo in the "Edit team" window, the logo does not update after being saved. The team logo remains unchanged.

To Reproduce
Steps to reproduce the behavior:

  1. Go to "Edit team"
  2. Click on "Browse"
  3. Choose an SVG file from your system
  4. Click "Save"
  5. Notice that the team logo remains unchanged

Expected behavior
After selecting and saving an SVG file as the team logo, the logo should update to reflect the new selection.

Additional context
It seems that SVG files are not being processed correctly when selected as the team logo. The ability to use SVGs as team logos would be a valuable feature due to their scalability and the prevalence of SVGs in logo design.

Dockerhub

Hi

Are this or will it be on Dockerhub by any change soon?

Will there be support for local data storage, other than AWS ?

StratEditor: recognize time-stamps

Highlight time-stamps in the StratEditor.

Given the sentence:

"We execute towards A at 1:12"

Here, the 1:12 should be highlighted, similar to the mention and utility link highlighting.
(optional) Little clock icon next to the time-stamp

Refactor canvas

  • Replace fabricjs with konvajs
  • Add flash and nade icons
  • Add arrows
  • Consider: make Map larger (maybe use full available screen space)

Utility Lightbox: Maintain 16:9 ratio

Most uploaded screenshots will be have an image ratio of 16:9.
We should consider to enforce the desktop view of the utility lightbox around this ratio for a more consistent experience.

Replace current PNG Icons with custom SVGs

Most of the current icons are from the fontawesome icon library.
Other, less generic icons like the mousebuttons, the "running", "standing", "crouching" icons etc, are self drawn PNGs which is not optimal -> design- and performance-wise.

Expected state:

  • replace custom icons with vector-based SVG icons
  • (optional) fit the design language of the fontawesome icons

Rework "Share Strat"

Instead of using the underlying stratid for the share link and setting shared: true in the strat object, it would be better to have a dedicated shareStrat endpoint that generates a uuid and adds it to a "shareId property on the strat.

from:
_id: 12345
shared: true
// share link -> .../share/12345

to:
_id: 12345
shareId: xxxx-xxxx-xxxxxx-xxxxx
// share link -> .../share/xxxx-xxxx-xxxxxx-xxxxx

Dummy data for new teams

When a team is created, there are example strats and utilities already added, to showcase how these might (or should) look.

Sort strats & utilities

Strats and utilities can be sorted by different properties, e.g.:

  • name (alphanumerically)
  • date added
  • date modified

They can also be sorted ascending and descending.

Also allow manual sorting via "sort" property on strats and utils and vue-draggable.

Rewrite server in Typescript

The backend is currently written in the express framework with vanilla js.
To prevent bugs and runtime errors the plan is to rewrite the whole thing in the fastify framework with typescript

  • Core migration
  • Authentication/Authorization
  • Database
  • Frontend Migration
  • Existing Data Migration

Changes

  • change JWT to cookie based session handling
  • add captcha bot check to registration (Evaluate https://www.mtcaptcha.com/ as an recaptcha replacement)
  • checkout if we need to create indices on lookup eg. email fields inside our schemas

Runtime improvements:

  • Delegate compression, rate limiting, SSL handling/redirect to reverse proxy (compression, express-rate-limit)
  • Static file serving through reverse proxy

Docker improvements:

  • Evaluate minio support for S3 emulation (required for unit testing).

Proposes

  • Add video redirection prompt so users know they are leaving stratbook.
  • Rewrite emails with mjml https://mjml.io/

Edit Profile / Edit Team: make fields clearable in DB

When editing a profile or a team and fields are left empty, they are simply not updated.
This way it's currently not possible to clear them completely.
The server should clear a field in the DB when an empty field is received.

Lock strats (exclude from collapse all)

  • Button on strat that toggles Lock
  • Some indicator showing if strat is currently locked
  • Locked strats are not collapsed when clicking "Collapse all"

Consider #8 when creating UX for this as there might be an overlap

Export/Import Functionality

  • Serialize strats to JSON
  • Include meta data like app version to allow import even after API changes
  • Save content to file, maybe encode as base64 or binary
  • Button to import strats, either add or replace existing

Strats show up twice after being added

Some users report that strats appear twice after they have been added.

TODO: find out when this is happening to reproduce and fix it:

  • browser
  • OS
  • internet speed?

Persist filter state

  • Save filterstate via storage adapter when changed
  • Load filterstate from storage adapter when app is bootstrapped

Use websocket data to update state on client side

Current state:

  • On every change to the database, the relevant clients get an event with the affected strat / team ID. They then make a request to fetch all strats / steps or team data again with a query to the db every time, creating an unnecessary performance impact

Expected state:

  • Get relevant change data from change stream and find and update only this data in client state, without making a new request.

Add Crop Feature for Team Logo Selection

Is your feature request related to a problem?
When uploading a team logo in the "Edit team" window, users are currently unable to crop their image. This can result in team logos that do not fit well in the allocated space or do not focus on the desired part of the image.

Describe the solution you'd like
Implement a cropping feature for the team logo selection. When a user uploads a team logo, they should be able to select a specific area of the image to use as the logo. The cropping tool could include options to adjust the aspect ratio and the position of the cropping box. After the user confirms their selection, the cropped image should be used as the team logo.

Describe alternatives you've considered
An alternative solution could be to provide guidelines on the optimal image dimensions for the team logo. However, this places the onus on the user to edit their image before uploading, which may not be ideal for all users.

Additional context
This feature would enhance the user experience by providing more control over the appearance of team logos. It would also ensure that all team logos look good in the allocated space, regardless of the original image size or aspect ratio.

Clean up fonts and typography in app

In the app all font style declarations currently look like this:

.class {
  font-family: $font_ubuntu-bold;
  font-size: 1.4rem;
  color: $color--abbey;
}

It would be cleaner to refactor this into a set of typography mixins like so:

@mixin typo_hl5($color: $color--abbey) {
  font-family: $font_ubuntu-bold;
  font-size: 1.4rem;
  color: $color;
}

.class {
   @include typo_hl5($color--white);
}

Allow multi-newlines in strats

Currently empty lines are automatically removed from strats on save by the html sanitizer. We can make an exception for
tags to allow empty lines.

Seperate Guards from Resolvers

Currently route guards and resolver logic is awkwardly mixed into the same functions. This needs to be seperated to prevent bugs and to make them more maintainable.

Request: Allow csgonades links

I'd like to request the ability to use csgonades in the 'video link' field when Adding Utility.

csgonades is the most popular community tool for learning/sharing nade lineups.

Since youtube videos often come as compilations of multiple nades per map, and the video cannot be trimmed to only show the one utility per entry, I believe allowing videos from this site will be a huge help for organization and reference.

TeamView: calendar with season start dates, tournaments etc.

It would be nice to have a calendar component on the teamview, that displays season start dates of different leagues, tournament start times and so on.
These would be authored by the stratbook maintainers, but this could also be an addition to a calendar component that teams can manage their appointments in.

Use soft delete for all db delete operations

  • Delete requests should only add a "deletedAt" field to the mongo document
  • Every response needs to filter out documents with deletedAt field set
  • This also enables change streams to get more info about "deleted" documents

Add "setpos" as third option for utilities

  • String property "setpos" command for utilities
  • Manageable in create and edit
  • Some default icon if no screenshot/yt video in util
  • Some easy way to copy setpos string from util view

4:3 image is zoomed instead of black bars

Hi,

nice tool. We start to like it a lot! When I upload an image from csgo (I play 4:3) then it is zoomed in when I open the screenshot on stratbook when I view it on my 16:9 monitor. This way I cannot see the edges of the screen. So maybe instead of zooming in, fill with black bars? Example below:

old:
old

new:
new

Lock / Unlock Strats

  • Strats can be locked
  • Locked strats can not be edited/deleted, steps can't be edited, added or deleted
  • Maybe: only team manager can lock/unlock strats
  • Maybe: locked strat is indicated by a "Lock" icon

Theme Support (Dark Theme)

  • Unify all colors and change them from scss variables to css variables
  • Set -dark / -light toggle class on root element
  • Add theme toggle -> Page corner or profile page

Show Utility description somewhere

Currently, a description can already be added when creating a utility item.
This description should be displayed somewhere, most likely in the lightbox.

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.