• This repository has been archived on 16/Feb/2024
  • Stars
    star
    166
  • Rank 227,748 (Top 5 %)
  • Language
    JavaScript
  • Created over 11 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ—บ๏ธ Floorplan, seating chart, and employee directory for Blue Jeans.

Floorplan

Where do people sit in the offices of Blue Jeans Network? What's that person's name, whose face I remember but never really met? I've heard of this person, but I don't know their face. Where are the different teams grouped? What is A2's email address?

Floorplan view

Floorplan

Administrative view

Floorplan Admin

Buzzwords

  • Backbone
  • Express
  • GraphicsMagick
  • Handlebars
  • jQuery
  • LESS
  • Mongo
  • Node
  • Q
  • SVG

Prerequisites

Install

  1. Clone the GitHub repository

     git clone https://github.com/Aldaviva/floorplan.git
     cd floorplan
    
  2. Install dependencies

     make install-deps
    

    This installs Graphicsmagick and several NPM modules.

  3. Set permissions so the server can write to the directories where CSS stylesheets and people's photos are saved

     chmod +rwx public/styles data/photos
    
  4. Create a configuration file based on the example

     cp config.example.json config.json
    
  5. You may edit the configuration file and change any settings you want, although the server will run with the default settings.

    • wwwPort is the TCP port on which the Floorplan HTTP server listens. Useful if you want the server to listen on a different port, like 80 or 8080. With the default value of 3000, you can access the Floorplan web interface by going to http://127.0.0.1:3000/.

    • dbHost is the host on which the MongoDB server runs. Useful if you have a MongoDB server on a different computer. With the default value of "127.0.0.1", the MongoDB server is on the same computer as Floorplan.

    • dbPort is the TCP port on which the MongoDB server listens. Useful if you have a non-default MongoDB configuration. With the default value of 27017, Floorplan will connect to a MongoDB server with a default configuration.

    • dbName is the name of the MongoDB database that will be used to store people added to Floorplan. Useful if you want to run multiple different Floorplan instances on the same MongoDB server. With the default value of "floorplan", people documents will be stored in the people collection of the floorplan database in your MongoDB server.

      If you want to connect to the database yourself, you can run

        mongo floorplan
        > db.people.find()
      
    • mountPoint is the HTTP path under which the Floorplan web interface will be served. Useful if you want to reverse-proxy the Floorplan server through another HTTP server like Apache or Nginx due to TLS or a desire to serve multiple services on port 80. With the default value of "/", you can access the Floorplan web interface by going to http://127.0.0.1:3000/, but if you changed mountPoint to /floorplan, you would have to go to http://127.0.0.1:3000/floorplan.

Run

node index.js

Use Ctrl+C to stop.

Usage

Viewing the Floorplan

Go to http://127.0.0.1:3000 in your web browser. You should see a blue page that says "MV" in the top left.

Adding people

Go to http://127.0.0.1:3000/admin/` in your web browser. You should see a white page that says "add person" in the top left.

Fill in the person's full name and any other details you want to set, then click the blue Save button.

Now when you view the Floorplan, the new person should appear in the list to the left and, if you assigned an office and seat, their photo will appear in their seating position.

Adding offices

  1. Go to the views/maps directory.
  2. Copy or edit the SVG files here.
  3. Restart the server for your changes to take effect.
  • The SVG files define
    • the dimensions of the office using the /svg/@viewBox attribute (minX, minY, width, height). (0,0) is the top-left corner of the SVG canvas.
    • the size and positions of the seats (minX, minY) using the JavaScript <script> elemnent to define this.SEATS.mv.iconSize and this.SEATS.mv.seatPositions. If you change the name of the office from "mv", make sure you change it here too.
    • the polygon.background element is the shape of the office footprint, which turns white in the Admin UI's seat choosing interface so the page isn't visible through the walls.
    • the g.walls and child g.innerWalls groups are the shapes that define where the walls of the office are, with differing styles
    • the g.roomNames group shows text on the Floorplan. Multiline text uses tspan elements for positioning. g.room groups optionally shows detailed conference room information, some of which (endpoint:id, .statusBadge) rely on external systems to work.
    • g.seats and g.photos are always empty, and will be populated by the client-side presentation layer to show where people sit.
    • .arrow links in some maps are used to navigate between offices that are spatially local to each other.
  • Map styles are set in public/styles/Map.less, including the way walls and text are rendered.
  • The street address and optional Yelp review link are defined in public/scripts/IntroView.js.
  • The office changer links in the top left are defined in public/scripts/ListPane.js.
    • The total number of offices is defined in public/styles/definitions.less.
    • The number of columns for the office changer links is defined in public/styles/ListPane.less.
  • The Admin UI office chooser is defined in views/admin.hbs.

I find that the easiest way to generate the SVG files is to

  1. Copy an existing SVG file

  2. Open the SVG in Adobe Illustrator to set the walls and seating positions visually. The seats can just be squares for now. Room areas can be any shapes you want.

  3. Export the SVG from Illustrator without overwriting my SVG using the View Code button

  4. Set the viewBox attribute value's top left position, width, and height to be the same as the Illustrator artboard.

  5. Copy the g.walls and g.innerWalls groups into my SVG

  6. Copy the rect elements you made for the seating positions into a text editor, preferrably one with column editing like Sublime Text, and convert their x and y attributes into a JavaScript array of [x, y] pairs:

    Temporary SVG code generated by Illustrator for seat rectangles

     <g class="seats">
         <rect width="20" height="20" x="146.363" y="927.371" />
         <rect width="20" height="20" x="847.134" y="813.174" />
     </g>
    

    JavaScript seats object array

     this.SEATS.mv = {
         iconSize: 20,
         seatPositions: [
             [146.363, 927.371],
             [847.134, 813.174]
         ]
     };
    
  7. Set the g.room .roomArea to be the room area shapes you made.

  8. Change the g.roomNames text, restart the server, and line up the text coordinates using your browser's Developer Tools for fine positioning.

More Repositories

1

DarkNet

๐ŸŒ“ Enable native Windows dark mode for your WPF and Windows Forms title bars.
C#
65
star
2

Fail2Ban4Win

๐Ÿงฑ Ban subnets using Windows Firewall rules after they make enough incorrect login attempts, as indicated by Windows Event Log records.
C#
38
star
3

ThrottleDebounce

๐Ÿš— Rate-limit your actions and funcs by throttling and debouncing them. Retry when an exception is thrown.
C#
36
star
4

AuthenticatorChooser

๐Ÿ—๏ธ Background program to skip the phone option and choose the USB security key in Windows credential prompts.
C#
31
star
5

local-ipv4-address

๐ŸŒ Get the LAN IPv4 address of the local machine based on the default gateway.
JavaScript
17
star
6

WinampNowPlayingToFile

โšก When Winamp plays a track, this plugin will save the track metadata and album art to files.
C#
15
star
7

DataSizeUnits

๐Ÿ“ Convert and format data size units in .NET (bits, bytes, kilobits, kilobytes, and others).
C#
13
star
8

Kasa

๐Ÿ”Œ Control TP-Link Kasa smart outlets/plugs.
C#
12
star
9

BehringerXTouchExtender

๐ŸŽš๏ธ MIDI controller client for Behringer X-Touch Extender DAW control surface.
C#
12
star
10

GamesDoneQuickCalendarFactory

๐Ÿ“… Generate a list of events for GDQ in iCalendar (ICS) format
C#
11
star
11

lock-your-windows

๐Ÿ” Activate the Windows lock screen (Win+L), or check if Windows is currently locked.
C++
10
star
12

webscale

โš– Measure weight using a Stamps.com digital USB postage scale.
JavaScript
9
star
13

mongoose-moment

๐Ÿ•ฐ Store Moment dates in Mongo using Mongoose internally as millisecond timestamps.
JavaScript
9
star
14

userscripts

๐Ÿ“œ User scripts for the Tampermonkey browser extension.
JavaScript
8
star
15

RemoteDesktopServicesCertificateSelector

๐Ÿ”’ Choose a different certificate to use for your Windows Remote Desktop server.
C#
7
star
16

StartMenuCleaner

๐Ÿงน Delete specified shortcuts and folders from the Start Menu which are automatically created by installers
C#
7
star
17

content-blocking-filters

๐Ÿ›ก Block ads and other unwanted content on web pages.
F#
6
star
18

VivaldiCustomLauncher

๐ŸŽป Intercept executions of Vivaldi to add custom arguments and apply tweaks files
C#
6
star
19

PowerMate

๐ŸŽ› Receive events and control the light on a Griffin PowerMate USB device
C#
6
star
20

PortForwardingManager

๐Ÿšข Automatically update the qBittorrent listening port based on the Private Internet Access forwarded port.
C#
5
star
21

hotkeys

โŒจ Add handy missing keyboard shortcuts to other programs using AutoHotkey.
AutoHotkey
4
star
22

Brighty

Set monitor brightness by typing a percentage.
C#
4
star
23

WebAutoType

Forked KeePass plugin that detects Vivaldi URLs without accessibility (MSAA), which is very slow in Vivaldi 3.0. Requires Vivaldi extension:
C#
4
star
24

userstyles

๐ŸŽจ User style sheets for the Stylus browser extension.
CSS
3
star
25

FileAssociationGuard

Fix file associations
C#
3
star
26

KoKo

๐Ÿต Declarative automatic state management in .NET with no boilerplate. Never deal with INotifyPropertyChanged again.
C#
3
star
27

Foregrounder

Bring a window in your process to the foreground, even if a different process's window is currently in the foreground.
C#
3
star
28

KillUnwantedProcesses

๐Ÿงจ Stop background tasks that get left behind after they are needed.
C#
3
star
29

microblog-favorites

โญ Save screenshots of your favorite posts with metadata, so that you can upload them to a digital photo frame and easily find them later.
Java
3
star
30

ruby-bjn-app-url-generator

Example of generating a meeting-specific app launch URL for the Blue Jeans desktop app using Ruby
Ruby
2
star
31

AddRemoveProgramsCleaner

Rename, set the icon, or hide programs in the Programs and Features list to make it cleaner and more readable.
C#
2
star
32

AutoAutoruns

Automatically disable specific autoruns that keep getting re-added by update installers.
C#
2
star
33

easter4j

Java library to figure out when Easter is.
Java
2
star
34

bricked

Which of my servers are down?
JavaScript
2
star
35

panoptichrome

Remotely control the browsers of your dashboards and inforads, without VNCing to a forgettable IP address.
JavaScript
2
star
36

VivaldiCustomResources

๐ŸŽป Custom resource files used to tweak the Vivaldi resource directory.
CSS
2
star
37

wake_rs

Send wake-on-LAN magic packets to computers defined in a configuration JSON file
Rust
2
star
38

RaspberryPiDotnetRepository

๐Ÿฅง APT repo of .NET runtime and SDK binary ARM DEB packages for Raspberry Pi OS
C#
2
star
39

Trainers

๐Ÿƒ Trainers for video games, which allow cheating by editing the game process' memory
C#
2
star
40

behringer-xtouch-extender

Java MIDI controller client for Behringer X-Touch Extender audio control surface
Kotlin
2
star
41

CiscoEndpointCertificateDeployer

๐Ÿ”’ Automatically upload and activate PKCS #12 PFX TLS certificates and private keys to Cisco video conferencing endpoints running TC, CE, or RoomOS software. Useful for Let's Encrypt automation, such as Certify The Web.
C#
2
star
42

KeePassTrayIconLockState

๐Ÿ”’ Replace the default KeePass Windows 98โ€“style tray icon with a wireframe padlock icon to match the style of built-in tray icons in Windows 10 and 11.
C#
2
star
43

WebAutoTypeVivaldiExtension

Extension for Vivaldi that sends the active URL to the KeePass WebAutoType plugin so it can autotype the correct password. Requires WebAutoType fork:
JavaScript
2
star
44

comcast_outage_notifier

Send notifications when a Comcast outage is reported for a given ZIP code.
Java
1
star
45

button_detector

React to presses of a button switch attached to a Raspberry Pi's GPIO pins
Shell
1
star
46

backdrop

Rotate your Android device's wallpapers with Flickr photos.
Java
1
star
47

MusicMapRecommender

Generate a ranked list of recommendations for new music artists, based on a list of artists you already like.
C#
1
star
48

speedtest-graphite

Measure Internet connection speed and publish the results to Graphite.
Shell
1
star
49

battleunpack

Automatically open all of your Battlefield 4 battlepacks, instead of manually giving yourself RSI.
JavaScript
1
star
50

rpi-dashboard-setup

Automatically configure a stock Raspberry Pi to act as a dashboard.
Python
1
star
51

HidClient

๐Ÿ–ฑ Common library class to receive updates from a USB HID and reconnect automatically when disconnected
C#
1
star
52

sieve

Dashboard that visually groups release tasks into boulders, rocks, and pebbles.
JavaScript
1
star
53

SWAT4ForceFeedback

Immediate feedback on unauthorized use of force in the game SWAT 4
UnrealScript
1
star
54

eircd

Erlang IRC server, inspired by txircd (Desert Bus' Python/Twisted IRC server).
Erlang
1
star
55

avidemux

Fork of Avidemux that fixes resizing and zooming issues.
C
1
star
56

shipit

How long until we need to slip the next release?
JavaScript
1
star
57

slackaway

Set your Slack presence to away if and only if you're using your computer.
JavaScript
1
star
58

PIAWatchdog

Kill processes when a Private Internet Access VPN connection goes down.
C#
1
star
59

WindowSizeGuard

๐ŸชŸ Hotkeys to move and resize windows. Enforce window sizes when toolbars are shown or hidden.
C#
1
star
60

OutlookLauncher

Start Outlook or, if it's already running, restore or foreground its window.
C#
1
star
61

Fix-Registry

โ–ฆ Remove cruft from Windows context menus and file associations that kept getting added back by updates
1
star
62

PowerOverInternet

๐ŸŒฉ๏ธ Turn on and off power to an electrical outlet using an HTTP API request
C#
1
star
63

Copywriter

ยฉ Automatically update copyright years in project sources. Handles .NET SDK-style .csproj files and .NET AssemblyInfo.cs files.
C#
1
star
64

TimeParabox

๐Ÿ Automated speedrun of the game Patrick's Parabox
C#
1
star
65

PowerCycler

๐Ÿ”› Have you tried turning it off and back on again?
C#
1
star
66

DryerDuty

๐Ÿงบ Send PagerDuty notifications when the dryer has finished a load of laundry
C#
1
star
67

Bom.Squad

๐Ÿ’ฃ Disable writing UTF-8 byte order marks (BOMs)
C#
1
star
68

SunsUpStreamsUp

๐ŸŒ… Automatically start an OBS stream when the sun rises, and stop it when the sun sets
C#
1
star
69

DakarMapper

Record maps as you drive through the stages of Dakar 18
C#
1
star
70

SolCalc

โ˜€ Find when sunrise, sunset, and different twilights happen for a given location, based on the NOAA ESRL Solar Calculator.
C#
1
star
71

pulse-dialer

Use pulse dials and other events from a rotary phone to control video conferencing endpoints.
JavaScript
1
star
72

ImapFolderSubscriptionGuard

Automatically unsubscribe from and delete IMAP folders that opinionated clients keep trying to create.
C#
1
star
73

FullMoonCalendar

๐ŸŒ• iCalendar server that shows when the moon is full
C#
1
star
74

LaundryDuty

๐Ÿงบ Trigger PagerDuty incidents when the washing machine is done.
C#
1
star
75

UnionTypes

โšญ๏ธŽ Union types implemented in C# using implicit casts
C#
1
star
76

RebootRouter

My TP-Link Archer C7 v2 keeps getting into a bad state where it causes frequent wi-fi reconnections on my phone (Google Pixel, Android 10) due to wpa_supplicant reason 6. Rebooting the router seems to fix the problem temporarily.
C#
1
star
77

SousVide

๐Ÿ‘จ๐Ÿปโ€๐Ÿณ Monitor and control an Anova Precision Cooker sous vide over Bluetooth.
C#
1
star
78

GitHooks

๐ŸŽฃ Before each Git commit, remove Microsoft.NET.ILLink.Tasks from package lock file to unbreak locked mode build machine jobs. Abort the commit if FIXME appears in any of the staged files.
C#
1
star