Code Monkey home page Code Monkey logo

anondraw's Introduction

Anondraw

Source code of http://www.anondraw.com

Starting out with programming?

Are you just getting started and want to try to contribute? Check out the starter issues: https://github.com/Squarific/Anondraw/issues?q=is%3Aissue+is%3Aopen+label%3AStarter

They are easier problems which should be solveable by people starting out. Still too hard? Feel free to message me and I'll work on it with you.

Questions

Have questions you need answered? Feel free to email [email protected] I promise I won't bite. Or alternativly join this discord: https://discord.gg/MDXx8qE Or use the issues

Starting

Start by pulling all the submodules with: git submodule update --init --recursive

Option 1: Docker

Running

Install docker. Run docker-compose up --build -d in the root folder (where the docker-compose.yml file is) To find the url and port go in the docker-compose.yml file.

To get around certificate errors you need to open all the urls yourself and accept the certificates. To accept the certificates for the websockets you need to change the url from wss:// to https:// Example: anondraw.min.js?v=2825593:847 WebSocket connection to 'wss://192.168.99.100:2552/socket.io/?EIO=3&transport=websocket' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID Means goto: https://192.168.99.100:2552 and accept.

If you are not using localhost (for example if you use docker legacy on windows), you need to change the certificates in all Dockerfile to the right ip. (E.g. localhost should be changed to 192.168.99.100 if that is the ip docker gives your virtual machine). You also need to change all clienthost in the config.json file to this ip. ALTERNATIVLY launch your browser in a way that it ignores certificates (THIS IS UNSAFE, DO NOT USE TO BROWSE EXTERNAL SITES)

Clientbuilder

The clientbuilder uses a volume for /src/client/src and /src/client/dist So changes in these directories are instant and will result in a rebuild. Changes above those directories (package.json, info.json, config.json, ...) are not instantly reflected and require a rebuild of the docker images.

Seeing the client build logs

To see the javascript errors of the build, you can use the following command: docker-compose logs -t -f clientbuilder

Login to database

Go to localhost:4400 The details are in the docker-compose.yml file.

Option 2: Manual

You will need to have node installed for your system. More info: https://nodejs.org/en/ You will need npm aswell. This normally is included with your node installation.

You will need the system dependencies for node-canvas: https://github.com/Automattic/node-canvas You will also need the java jdk to run the build process.

First you will have to install the npm modules for the server. Go into src/server and in every subfolder run npm install

Afterwards go back to src and make a config for your local machine. (You probably want to change all references of direct.anondraw.com to localhost). More info on the configuration is down below.

The next step is going into src/client and running node build.js this will build the client into the dist folder with the right configs.

Then you want to run all the js files in the server folders. Example for the realtime server: go into the realTime folder and run node anondraw.js

Now you can go to the src/client/dist folder and open index.html, you should now have anondraw running locally.

Configuration

Properties live in the config.json file closest to src/server/common/config.js. Therefore it does not matter where the config file is placed, as long as it is in a directory that is a parent of any server.

A default config.json is provided in src/config.json as an example, but should not be used in production. Instead a $NODE_ENV$.config.json will be chosen if the environmental variable NODE_ENV is set.

Example:

  • export NODE_ENV= can use src/config.json
  • export NODE_ENV=beta can use /beta.config.json
  • export NODE_ENV=production can use /production.config.json

Hotfixes

  • websockets/ws#810

    • applied this pull request changes to ws in realtime's node_modules/ws/lib/Sender.js which prevents call stack crashes.
  • The brightfox server uuid requires a seperate SQL file

anondraw's People

Contributors

generic-knight avatar henryruss2 avatar ilger avatar intorfloat avatar krank-art avatar leandro2222 avatar lukasdietrich avatar squarific avatar thegorox avatar

Stargazers

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

Watchers

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

anondraw's Issues

Prevent drawing long distance

When you are following someone and they start drawing while you are drawing it will create a huge line using up all of your ink.

User rooms

Let every user create their own room that you can only draw in if they have given you permission
.
Maybe limited to 50rep+?

Profiles

Add a profile that shows off drawings people made
Let them add a little bio (markdown support)

Clickable links

Turn urls into clickable links in chatroom.
(especially for the room invite link)

Detect proxys

A lot of proxy give the original ip. Those should also be checked to see if they are banned.

Experiment: one time ink

A room where people with a certain amount of reputation can draw with limited ink that does not regenerate.

Coloring images

Add some black and white linedrawings that people can color together.

Split server up

Split up the server into:

  • RealTime drawing + chat
  • Player server (ban, permissions, reputation, ...)
  • Load Balancing server

Offline mode

Add an offline mode and package it for the chrome store

New game: roleplay

New game mode proposal

There is a host that draws a picture and adds some text.
Then people vote on a choice. After a few votes or some time the host draws a new picture.
This way they can tell a story and go on an adventure.

Friendlist

Add people to a friendlist
Have a private chat
Invite them to a room (bypassing max user count)

Permanent background

Create an image server that serves chunks. Every so often let the realtime server send the image server the drawings and discard them.

The client side code for this has mostly been added and only has to be uncommented and slightly changed.

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.