Giter Site home page Giter Site logo

shimada-toy-box / placecal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geeksforsocialchange/placecal

0.0 0.0 0.0 45.51 MB

The Community Calendar

Home Page: https://placecal.org

License: GNU Affero General Public License v3.0

Ruby 72.47% JavaScript 1.45% CSS 0.28% HTML 16.74% Shell 0.24% SCSS 1.44% Sass 7.21% Procfile 0.01% Makefile 0.16%

placecal's Introduction

PlaceCal

Introduction / Warning

PlaceCal is a large and very complicated app for collating organisation and event information from a large variety of sources. In the words of one developer: "I'm not sure where the interface between the app and the real world is here".

To get an idea of the project and what we're about, check out the handbook.

Requirements

To run PlaceCal locally you will need:

  • A Mac or a Linux machine (we don't support Windows at present)
  • GNU Compiler Collection (gcc) (for compiling ruby and gems)
  • Docker (optional) (for isolating and automating postgres management)
  • Postgres relational database. We are currently using v14.
    • Server
      • either installed for your distribution or as a docker image (with the correct open port -- see below)
    • Client
      • you will still need the local developer libraries for postgres
      • these are distribution specific so you need to find out what they are called to install them
        • libpq-dev (debian)
        • postgresql-libs (arch)
        • dev-db/postgresql (gentoo)
  • Ruby 2.7.x. We reccomend using a version manager for this such as rvm or rbenv. Current version we are using is in .ruby-version.
  • Node.js 16.x. We recommend using a version manager for this such as nvm or nodenv. Current version we are using is in .node-version.
  • Yarn 1.x
  • ImageMagick for image manipulation
  • Graphviz for documentation diagrams
  • Chrome/Chromium for system tests along with a matching version of Chromedriver

Quickstart with docker for GFSC devs

Make sure all of the above dependencies are installed (and ask someone to add your public ssh key to the servers if you are staff).

Then make sure the docker daemon is running, and run

make setup_with_docker

Local site is now running at lvh.me:3000

Some other useful commands for developing can be found in the makefile.

Quickstart for everyone else

Set up Postgresql locally with docker

If you don't already have Postgresql installed and running, you can set it up with docker, just run make docker. To tear down the docker setup, run make clean.

Run the setup script

bin/setup

Amongst other things, this will create an admin user for you:

Run the thing

  • Start the server with bin/dev
  • Make sure you use lvh.me:3000 instead of localhost:3000 or you will have authentication problems
  • The admin interface is at admin.lvh.me:3000
  • Access code docs through your local filesystem and update them with bin/rails yard

Testing

PlaceCal tests are written in minitest.

Before running the tests please make sure your development environment is up to date (you can run bin/update to quickly do that).

You can run the tests with:

make              # will run all unit and system tests then lint check all code
rails test        # will run all unit tests
rails test:system # will run system tests

Note that the system tests can take a while to run and are quite resource-intensive. To perform more advanced usage like executing only a specific test or test file, see the Rails documentation on testing.

Documentation for Developers

The documentation for PlaceCal currently stored in notion and can be read here. There is also a small amount of documentation sprinkled throughout the code itself and can be turned into HTML by running rails doc:generate. If you are working with the code and are completely lost you can also try the GFSC discord server where you can prod a human for answers. Good Luck!

Generating new components

We use view_component to make components, and you can create a new one by running rails g component <Name> <args> More info here: https://viewcomponent.org/guide/generators.html

Formatting

We use Prettier to format everything it's able to parse. It will run as a pre-commit hook and format your changes as you make commits so you shouldn't have to think about it much.

If you do want to run it manually, you can:

bin/yarn run format

It's also run for you by the test runner.

Note that we use tabs over spaces because tabs are more accessible to people using braille displays.

Linting

We use Rubocop to lint our Ruby code. Because of the time it can take to run, this is a manual step:

bin/bundle exec rubocop --autocorrect

It's also run for you by the test runner.

Contributing

We welcome new contributors but strongly recommend you have a chat with us in Geeks for Social Change's Discord server and say hi before you do. We will be happy to onboard you properly before you get stuck in.

Donations

If you'd like to support development, please consider sending us a one-off or regular donation on Ko-fi.

ko-fi

placecal's People

Contributors

kimadactyl avatar gabalexandria avatar ivankocienski avatar ivan-kocienski-gfsc avatar lexiwitch avatar r-ferrier avatar dependabot-preview[bot] avatar renovate[bot] avatar crantok avatar erbridge avatar aaaaargzombies avatar rorong avatar dependabot[bot] avatar dependabot-support avatar katjam avatar mun-tonsi avatar

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.