GithubHelp home page GithubHelp logo

communityfocus's Introduction

Community Focus

CommunityFocus is a sharable time tracking app for teams.

Tech Stack

TypeScript, React, Web Sockets, MongoDB, Node.js, Express.js

Getting Started

Repositories:

To Contribute:

To Install

  • Fork and clone both repos
  • npm install on each to install dependencies
  • npm run dev on each to run the server

communityfocus's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

communityfocus's Issues

Add page to create new timer

What

On the homepage "/", create a button to route the user to a room. A room would be "/:room".

How

When the user clicks on the "Start a timer" button, they get re-routed to a room. The room name (string) is generated on the server when sending a request to "/randomid" (this route does not exist yet). On the server, "/randomid" generates a random string (this will be improved in #18)

Add brand icon

Description

  1. Look for icon options
  2. Discuss with team/get a vote going
  3. Add icon to app

Add input box on LandingPage for user to create custom timer

Description

Add a input box on the Landing page so that the user can input their own custom timer name.

There should be a button next to the input box that redirects the user to that room.

For example: User inputs abc, clicking the button should redirect the user to https://url/abc

Frontend missing GitHub issue templates

Backend currently contains two issue templates:

  • bug_report.md
  • feature_request.md

Should we also include these templates (or similar ones) in the frontend as well?

Create user welcome message for header

What

The header component (which will be created in #45) needs a component to display the message "Hi, NAME!", where NAME is the user's name. Since we do not have username functionality implemented yet, you can use a placeholder of "NAME" for the user's name.

Please reference the Figma design at https://www.figma.com/file/aOxY6JeMesN7fq72tZsbD9/Untitled?type=design&t=ojy9KXiE1A3V8cHZ-0 for an idea of how this component will look (design subject to change). This component is located in the upper-right corner in the green header bar.

WelcomeMessage

Details

  • Component that creates an element that display's the message "Hi, NAME!".
    • Example:
      <WelcomeMessage />
      
      // result
      <span>Hello, NAME!</span>
  • No styling required as of right now, only the basic functionality.
  • No testing required as of right now, this will be handled in a separate issue.

Input validation when creating new timers

Description

When user adds a custom timer name (and username), check that the input supports only valid strings. Unsupported/non strings/weird chars should not be allowed.

Blocker: #32

Style the timestamp/controls to be centered

What

Create a parent component that will encase the timestamp, controls etc in the center of the screen. Make sure the timestamp/controls are centered at all breakpoints.

Create footer component

What

This will be the footer component that will contain the MembersUsingMessage component (#46). This issue depends on the MembersUsingMessage comopnent being completed first, so this cannot be done until that issue is complete.

Please reference the Figma design at https://www.figma.com/file/aOxY6JeMesN7fq72tZsbD9/Untitled?type=design&t=ojy9KXiE1A3V8cHZ-0 for an idea of how this component will look (design subject to change). This component is located at the bottom of the screen.

Footer

Details

  • Component that creates a footer containing the MembersUsingMessage component.
    • Example:
      <Footer/>
      
      // result
      <footer>
          <MembersUsingMessage />
      </footer>
  • No styling required as of right now, only the basic functionality.
  • No testing required as of right now, this will be handled in a separate issue.

Add Footer styling / styled components

What

Create the styled component(s) and styling for the footer component (#47) and its child components (MembersUsingMessage). This issue depends on #47 being finished, so this cannot be done until that issue is complete.

Please reference the Figma design at https://www.figma.com/file/aOxY6JeMesN7fq72tZsbD9/Untitled?type=design&t=ojy9KXiE1A3V8cHZ-0 for an idea of how this component will look (design subject to change). This component is located at bottom top of the screen.

Footer

Details

  • Add styling and styled component(s) to the Footer component and child components (MembersUsingMessage).
  • No testing required as of right now, this will be handled in a separate issue.

Remove the socket connection manager buttons on the frontend

What

The connect code has the connection manager buttons ('connect', 'disconnect'). These buttons and any related code needs to be removed

NOTE: do not remove the ability for the browser to open and connect to the websocket connection. Only remove the buttons and any related unneeded code

Home page text should be centered

Description

Home Page text should be centered and should say "Community Focus" with the join room button under it.

How to

We use https://styled-components.com/ for CSS. You can create a styled component in a file with file name <FILE_NAME>.styled.tsx and then import that component into the <FILE_NAME>.tsx.

EPIC: Create basic timer UI and functionality (MVP)

What

Add some basic functionality to the timer as follows

Stage 1

  • #17
  • #16
  • CommunityFocus/CommunityFocus#15
  • #14
  • #13
  • #21
  • #9
  • #11
  • #8
  • #54
  • Add a refresh button on the LandingPage so the user can cycle between multiple server suggested timer names
  • #53
  • #18
  • Add color scheme
  • Update the main readme
  • Add a get started guide
  • #7
  • #10

Stage 2

Stage 3

  • Add change history to the current timer
  • #99
  • Host the app
  • #32
  • Add name bubbles to show who's currently in the timer
  • Add custom ring options at the end of the countdown (volume, ring type, continuous/short ring etc)

Pre-release

Add Pausing/Unpausing timer functionality

What

Add ability to pause/unpause timer.

There will be only 1 button that toggled between pause and resume.

When a user clicks pause, the UI and the timer changes for all connected clients. When a user clicks pause, more options are shown (resume, reset, stop)

How

The server ticks down but doesnt send a timestamps every second. The client emits a timerRequest when user joins the room or on connection, to which the server responds to the client with the timerResponse with the secondsRemaining, which the client uses to start a local timer.

When pausing, both the client and the server need to pause.

  1. When the client pauses, it should emit a pauseCountdown event,
  2. the server will use the pauseCountdown event to pause the timer on the server
  3. Server will send a timerResponse to all clients so they can all pause
  4. When client recieves the timerResponse event, it will pause the countdown locally
  5. When paused/unpaused, the frontend pause/unpause button text should also be toggled.

Add tsconfig.development.json with source maps enabled - backend only

What

Add tsconfig.development.json which will extend tsconfig.json and enable source maps. Source maps should stay disabled in production (default setting), but be enabled in development. This will also change the package.json so that npm run dev will call tsc with the flag --project tsconfig.development.json.

Note: This is only needed for the backend. Frontend debugging attaches to the browser and does not require source maps.

Why

Source maps needs to be enabled to enable debugging features such as setting breakpoints. It creates a .map.js file for every .js file inside of the dist folder and makes it possible to debug Typescript files. Since it creates a .map.js file for ever .ts file, we don't want this enabled during production, only during development.

While we could just use console.log, eventually the project will become large and complicated enough that it would be better to use IDE debugging features to efficiently debug issues. And by enabling source maps, this will allow us to use debugging features in VSCode / nvim / whatever environment you use that supports debugging.

Run the setTimeout on the client and dont rely on the socket timestamp for every tick

Description

Currently, the socket sends the updateTimer message every second and the client updates the timestamp based on the socket message.

One of the problems with this approach is that if a user gets timed out (lost internet connection) but doesn't close the browser, the app doesn't run the timer, and the user isn't notified of the end of the timer.

Instead, we can use the server as the source of truth, but run a timer on the client instead. The server still updates the client from time to time, on pause, on resume, on stop etc

Add a Reset timer button to go reset the current timestamp to the original timestamp picked

What

Add a reset timer button.

If the user clicked on a countdown of 60 seconds [60,59,58,57...], when ticking down [54,53,52,51,50,49....], if a user clicks on 'reset', the timer will be reset to 60 seconds [60,59,58,57...]

How

The server ticks down but doesn't send a timestamps every second. The client emits a timerRequest when user joins the room or on connection, to which the server responds to the client with the timerResponse with the secondsRemaining, which the client uses to start a local timer.

The restartCountdown event will be very similar to startCountdown but it will restart the timer that was originally picked

When resetting the timer, both the client and the server need to reset.

  1. When the client resets, it should emit a restartCountdown event,
  2. the server will use the restartCountdown event to restart the timer on the server based on the originally picked time
  3. Server will send a timerResponse to all clients so they can all start/restart
  4. When client receives the timerResponse event, it will start the timer locally
  5. When the timer was paused, we can reset the pause to false

Add functionality for users to add their names to the timer

Description

Add functionality for a user to add their name on to the timer. This will be reflected on the top right as "Hi, Mario!" and also on the update logs like "Mario changed the timer", "Mario Paused the timer" etc.

This also includes the user input like the modal, adding and reading the name from local storage.

This issue will not involve anything on the backend. This will be purely frontend. There will be another ticket for backend functionality.

Discussion

  • Do we use a modal to change the name?
  • Do we suggest a randomized name for the user?

Show the timestamp in HH:MM:SS

What

Convert the timestamp from seconds to HH:MM:SS

How

Create a reusable function that converts seconds into HH:MM:SS.

Cases:

  1. 00:00
  2. 00:05
  3. 00:59
  4. 25:59
  5. 02:59:59
  6. 9999:59:59

Testing

  • Write jest tests to verify the timestamps

Add external library to give random timer name

What

When creating a new timer, user can do one of 2 things for the name of the timer (eg: www.timer.com/love-item-poppy). Pick/Type a custom name of their choosing OR use a generated one. This issue aims to generate random names based on the params below.

How this would would is, when the home page loads, the user will be given a prefilled textbox with a generated name. If they choose to overwrite the generated name, they can retype a custom name.

Requirements

  1. Kabab case (separated by "-")
  2. Randomly choose between 3 or 4 (eg: bub-noted-cows | cat-dog-rat-moo)
  3. Randomly choose from a list of 2 letter, 3 letter, 4 letter and 5 letter words (English dictionary)
  4. The English words should be common, easy to type/remember words (cat, dog, moo, too, rug etc and NOT hard to remember/type words)

Testing

  1. Add jest unit tests

Extend the destroyTimer to more than 10 seconds

Description

When a timer is created, the timerStore object on the server stores the roomName, timer instance (setTimeout), list of connected users, and the destroyTimer instance (setTimeout).

The destroyTimer acts as a way to purge the roomName and all its related properties when no one is using a timer. For example, when a user creates and uses room /test123, and leaves it after using it, the timer instance will continue to tick down, until the destroyTimer deletes the roomName. This is done so that memory, computing power etc dont get added up by ununsed timers.

Currently, the destroyTimer count is set to 10 seconds. We can update this value to 2 mins, to allow users to join if disconnected unintentionally.

Create header component

What

This will be the header component that will contain the Logo (#44) and WelcomeMessage (#43) components along the top of the page. This issue depends on those two issues being finished, so this cannot be done until those issues are complete.

Please reference the Figma design at https://www.figma.com/file/aOxY6JeMesN7fq72tZsbD9/Untitled?type=design&t=ojy9KXiE1A3V8cHZ-0 for an idea of how this component will look (design subject to change). This component is located at the top of the screen.

Header

Details

  • Component that creates a header containing the Logo and WelcomeMessage components.
    • Example:
      <Header />
      
      // result
      <div>
          <Logo />
          <WelcomeMessage />
      </div>
  • No styling required as of right now, only the basic functionality.
  • No testing required as of right now, this will be handled in a separate issue.

Create CommunityFocus Logo Component

What

The header component (which will be created in #45) needs a component to display the CommunityFocus logo.

Please reference the Figma design at https://www.figma.com/file/aOxY6JeMesN7fq72tZsbD9/Untitled?type=design&t=ojy9KXiE1A3V8cHZ-0 for an idea of how this component will look (design subject to change). This component is located in the upper-left corner in the green header bar.

Logo

Details

  • Component that creates an element that display's the CommunityFocus logo.
    • Example:
      <Logo />
      
      // result
      <img src="..." alt="CommunityFocus Logo" />
  • No styling required as of right now, only the basic functionality.
  • No testing required as of right now, this will be handled in a separate issue.

Add Header styling / styled components

What

Create the styled component(s) and styling for the header component (#45) and its child components (Logo and WelcomeMessage). This issue depends on #45 being finished, so this cannot be done until that issue is complete.

Please reference the Figma design at https://www.figma.com/file/aOxY6JeMesN7fq72tZsbD9/Untitled?type=design&t=ojy9KXiE1A3V8cHZ-0 for an idea of how this component will look (design subject to change). This component is located at the top of the screen.

Header

Details

  • Add styling and styled component(s) to the Header component and child components (Logo and WelcomeMessage).
  • No testing required as of right now, this will be handled in a separate issue.

Create timer preset buttons

Description

Create a button component that will contain preset timer values such as 5, 10, 15, 20 ... up to 55. The purpose of this component will be to populate the timer with a preset value, rather than having to enter a number in a text box.

Details

  • Reusable component that takes in a prop such as "amount", and creates a button with this value as the label.
    • Example:
      // Creates a button element that shows the value "20"
      <TimerButton amount={20} />
      
      // result
      <button type="button" value="20">20</button>
  • No styling required as of right now, only the basic functionality.
  • No timer functionality required as of right now, this will be handled in a separate issue.
  • No testing required as of right now, this will be handled in a separate issue.
  • We can leave the manual input as is. This issue only aims to add the above buttons.

Create footer "# members use the Community Focus app" component

What

The footer component (which will be created in #47) needs a component to display how many members are currently using the app. Since we do not have user functionality implemented yet, you can use a placeholder number for the number of members using the app.

Please reference the Figma design at https://www.figma.com/file/aOxY6JeMesN7fq72tZsbD9/Untitled?type=design&t=ojy9KXiE1A3V8cHZ-0 for an idea of how this component will look (design subject to change). This component is located in the bottom of the page (see the pages on the right-most side of the Figma file).

MembersUsingMessage component

Details

  • Component that creates an element that display's the number of users using the app (placeholder text).
    • Example:
      <MembersUsingMessage />
      
      // result
      <span>125 members use the Community Focus app</span>
  • No styling required as of right now, only the basic functionality.
  • No testing required as of right now, this will be handled in a separate issue.

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.