Giter Club home page Giter Club logo

gitclub's Introduction

GitClub

This is an example application based on GitHub that's meant to model GitHub's permissions system. The app is implemented in a number of backend languages, which all expose a common API that is consumed by a React frontend (in the frontend/ folder).

For more information, check out one of the backend implementations linked below.

Backends

Frontend

Running the frontend

$ cd frontend
$ yarn
$ yarn start

Architecture

  • TypeScript / React / Reach Router

Development

The backends all run on port 5000, and use cookies to manage sessions.

If you want to be able to debug/test the backend without running the frontend and logging in, you can use the following to save a session locally:

Save the cookies

curl -c gitclub.cookies -H "Content-Type: application/json" -X POST -d '{"email": "[email protected]"}' localhost:5000/session

Use the cookies

curl -b gitclub.cookies localhost:5000/orgs/1

gitclub's People

Contributors

dhatch avatar gj avatar gkaemmer avatar leina05 avatar patrickod avatar samraper avatar samscott89 avatar saolsen 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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitclub's Issues

Python errors with flask-sqlalchemy backend example

  1. Initial error:
(venv) > pip3 install -r requirements.txt
Collecting flask~=1.1.4 (from -r requirements.txt (line 1))
  Using cached Flask-1.1.4-py2.py3-none-any.whl (94 kB)
Collecting SQLAlchemy~=1.3.20 (from -r requirements.txt (line 2))
  Using cached SQLAlchemy-1.3.24.tar.gz (6.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
ERROR: Could not find a version that satisfies the requirement oso==0.25.1 (from versions: 0.26.4, 0.27.0)
ERROR: No matching distribution found for oso==0.25.1

  1. after installing oso 0.26.4
(venv) $ FLASK_APP="app:create_app(None, True)" flask run
Traceback (most recent call last):
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/bin/flask", line 5, in <module>
    from flask.cli import main
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/__init__.py", line 14, in <module>
    from jinja2 import escape
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/markupsafe/__init__.py)

  1. after downgrading markupsafe -> 2.0.1
(venv) > FLASK_APP="app:create_app(None, True)" flask run
 * Serving Flask app "app:create_app(None, True)"
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
Traceback (most recent call last):
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/bin/flask", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 967, in main
    cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 848, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 305, in __init__
    self._load_unlocked()
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 330, in _load_unlocked
    self._app = rv = self.loader()
                     ^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 388, in load_app
    app = locate_app(self, import_name, name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 259, in locate_app
    return find_app_by_string(script_info, module, app_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 184, in find_app_by_string
    app = call_factory(script_info, attr, args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/venv/lib/python3.11/site-packages/flask/cli.py", line 115, in call_factory
    return app_factory(*arguments)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/app/__init__.py", line 73, in create_app
    init_oso(app, Session)
  File "/XXX/osohq/gitclub/backends/flask-sqlalchemy/app/__init__.py", line 150, in init_oso
    oso.register_class(
TypeError: Polar.register_class() got an unexpected keyword argument 'build_query'

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.