Code Monkey home page Code Monkey logo

bracket's Introduction

  • Graduated in Aerospace Engineering, currently working as Software Engineer.
  • Interested in Linux, web/Android development and 3D graphics. And of course aerospace.
  • I’m currently working on Bracket (website, repo)
  • I mainly use Python and Rust

bracket

bevy-hydrology

LinkedIn  

bracket's People

Contributors

dependabot[bot] avatar djpiper28 avatar evroon avatar github-actions[bot] avatar robigan avatar sevichecc 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  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

bracket's Issues

Backend Startup Failure Due to bcrypt Version Error

After completing the basic backend setup, I attempted to run ./run.sh. However, the operation failed, potentially due to an issue related to bcrypt. How could I solve this?

Related issues:

[2023-12-18 13:53:39 +0800] [92564] [INFO] Starting gunicorn 21.2.0
[2023-12-18 13:53:39 +0800] [92564] [INFO] Listening at: http://127.0.0.1:8400 (92564)
[2023-12-18 13:53:39 +0800] [92564] [INFO] Using worker: bracket.uvicorn.RestartableUvicornWorker
[2023-12-18 13:53:39 +0800] [92569] [INFO] Booting worker with pid: 92569
 ⚠ Port 3000 is in use, trying 3001 instead.
 ⚠ Port 3001 is in use, trying 3002 instead.
   ▲ Next.js 14.0.3
   - Local:        http://localhost:3002

[2023-12-18 13:53:39,826] [bracket] [INFO] Current env: DEVELOPMENT
(trapped) error reading bcrypt version
Traceback (most recent call last):
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/passlib/handlers/bcrypt.py", line 620, in _load_backend_mixin
    version = _bcrypt.__about__.__version__
AttributeError: module 'bcrypt' has no attribute '__about__'
[2023-12-18 13:53:40 +0800] [92569] [INFO] Started server process [92569]
[2023-12-18 13:53:40 +0800] [92569] [INFO] Waiting for application startup.
[2023-12-18 13:53:40 +0800] [92569] [ERROR] Traceback (most recent call last):
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/Users/seviche/Desktop/Project/bracket/backend/bracket/app.py", line 36, in lifespan
    await database.connect()
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/databases/core.py", line 112, in connect
    await self._backend.connect()
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/databases/backends/postgres.py", line 74, in connect
    self._pool = await asyncpg.create_pool(**kwargs)
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/pool.py", line 403, in _async__init__
    await self._initialize()
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/pool.py", line 430, in _initialize
    await first_ch.connect()
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/pool.py", line 128, in connect
    self._con = await self._pool._get_new_connection()
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/pool.py", line 502, in _get_new_connection
    con = await connection.connect(
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/connection.py", line 2329, in connect
    return await connect_utils._connect(
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/connect_utils.py", line 1017, in _connect
    raise last_error or exceptions.TargetServerAttributeNotMatched(
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/connect_utils.py", line 991, in _connect
    conn = await _connect_addr(
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/connect_utils.py", line 828, in _connect_addr
    return await __connect_addr(params, True, *args)
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/connect_utils.py", line 873, in __connect_addr
    tr, pr = await connector
  File "/Users/seviche/.local/share/virtualenvs/backend-uNhJPzew/lib/python3.10/site-packages/asyncpg/connect_utils.py", line 744, in _create_ssl_connection
    tr, pr = await loop.create_connection(
  File "/opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 1084, in create_connection
    raise OSError('Multiple exceptions: {}'.format(
OSError: Multiple exceptions: [Errno 61] Connect call failed ('::1', 5432, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 5432)

[2023-12-18 13:53:40 +0800] [92569] [ERROR] Application startup failed. Exiting.

Parallel tests

pytest-xdist can be used to run integration and unit tests in parallel

Finish scheduling system

round robin: schedule automatically
ladder: schedule manually (with button for automatic scheduling)

Why always localhost?

Hello, why does the docker installation always trying to connect to localhost:8400? Its not running on localhost, its running behind a reverse proxy!

Error console when trying to login:
POST http://localhost:8400/token net::ERR_CONNECTION_REFUSED

Add stage item failed

Reproduce Error:

  1. A fresh docker compose up
  2. Add one Club
  3. Create new Tournament
  4. Add 4 Teams
  5. Add Courts
  6. Add Stage (works)
  7. Add stage item --> fails
Unhandled Runtime Error
Error: [@mantine/core] Option value must be a string, other data formats are not supported, got number
Error Output Details

Unhandled Runtime Error
Error: [@mantine/core] Option value must be a string, other data formats are not supported, got number

Call Stack
validateOptions
node_modules/@mantine/core/esm/components/Combobox/OptionsDropdown/validate-options.mjs (16:0)
OptionsDropdown
node_modules/@mantine/core/esm/components/Combobox/OptionsDropdown/OptionsDropdown.mjs (64:17)
renderWithHooks
node_modules/react-dom/cjs/react-dom.development.js (16305:0)
mountIndeterminateComponent
node_modules/react-dom/cjs/react-dom.development.js (20074:0)
beginWork
node_modules/react-dom/cjs/react-dom.development.js (21587:0)
HTMLUnknownElement.callCallback
node_modules/react-dom/cjs/react-dom.development.js (4164:0)
Object.invokeGuardedCallbackDev
node_modules/react-dom/cjs/react-dom.development.js (4213:0)
invokeGuardedCallback
node_modules/react-dom/cjs/react-dom.development.js (4277:0)
beginWork$1
node_modules/react-dom/cjs/react-dom.development.js (27451:0)
performUnitOfWork
node_modules/react-dom/cjs/react-dom.development.js (26557:0)
workLoopSync
node_modules/react-dom/cjs/react-dom.development.js (26466:0)
renderRootSync
node_modules/react-dom/cjs/react-dom.development.js (26434:0)
performConcurrentWorkOnRoot
node_modules/react-dom/cjs/react-dom.development.js (25738:0)
workLoop
node_modules/scheduler/cjs/scheduler.development.js (266:0)
flushWork
node_modules/scheduler/cjs/scheduler.development.js (239:0)
MessagePort.performWorkUntilDeadline
node_modules/scheduler/cjs/scheduler.development.js (533:0)

Question: reason for dev mode in production

Your documentation seems to suggest that the environment needs to be set to "DEVELOPMENT" as per your docker compose file. If it can be avoided i would prefer to not do that in production. Is there a specific reason for that and if so can I still avoid that?

Environment variables not available at build time during Dockerfile build

The problem with how Next.js handles environment variables is that environment variables sent to the browser via NEXT_PUBLIC_ are only evaluated at build time, or for Docker users, that would be during build of the Dockerfile. Per Next.js documentation:

In order to make the value of an environment variable accessible in the browser, Next.js can "inline" a value, at build time, into the js bundle that is delivered to the client, replacing all references to process.env.[variable] with a hard-coded value. To tell it to do this, you just have to prefix the variable with NEXT_PUBLIC_.

Issue in first time databse creation

Traceback (most recent call last):
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/starlette/routing.py", line 734, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/home/robigan/Documents/Source/bracket/backend/bracket/app.py", line 51, in lifespan
    run_migrations()
  File "/home/robigan/Documents/Source/bracket/backend/bracket/app.py", line 42, in run_migrations
    command.upgrade(alembic_cfg, "head")
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/command.py", line 403, in upgrade
    script.run_env()
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/script/base.py", line 583, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/robigan/Documents/Source/bracket/backend/alembic/env.py", line 47, in <module>
    run_migrations_online()
  File "/home/robigan/Documents/Source/bracket/backend/alembic/env.py", line 39, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/runtime/environment.py", line 948, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/runtime/migration.py", line 627, in run_migrations
    step.migration_fn(**kw)
  File "/home/robigan/Documents/Source/bracket/backend/alembic/versions/6458e0bc3e9d_add_stages_table.py", line 23, in upgrade
    op.create_table(
  File "<string>", line 8, in create_table
  File "<string>", line 3, in create_table
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/operations/ops.py", line 1311, in create_table
    return operations.invoke(op)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/operations/base.py", line 445, in invoke
    return fn(self, operation)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/operations/toimpl.py", line 131, in create_table
    operations.impl.create_table(table)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/alembic/ddl/impl.py", line 363, in create_table
    table.dispatch.before_create(
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/event/attr.py", line 346, in __call__
    fn(*args, **kw)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 875, in __call__
    return getattr(self.target, self.name)(*arg, **kw)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/base.py", line 2206, in _on_table_create
    self.create(bind=bind, checkfirst=checkfirst)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/base.py", line 2111, in create
    bind._run_ddl_visitor(self.EnumGenerator, self, checkfirst=checkfirst)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2221, in _run_ddl_visitor
    visitorcallable(self.dialect, self, **kwargs).traverse_single(element)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/sql/visitors.py", line 524, in traverse_single
    return meth(obj, **kw)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/base.py", line 2152, in visit_enum
    self.connection.execute(CreateEnumType(enum))
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1385, in execute
    return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/sql/ddl.py", line 80, in _execute_on_connection
    return connection._execute_ddl(
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1477, in _execute_ddl
    ret = self._execute_context(
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
    self._handle_dbapi_exception(
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
    util.raise_(
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
    self.dialect.do_execute(
  File "/home/robigan/.local/share/virtualenvs/backend-j0cBvc18/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.DuplicateObject) type "stage_type" already exists

[SQL: CREATE TYPE stage_type AS ENUM ('SINGLE_ELIMINATION', 'SWISS', 'SWISS_DYNAMIC_TEAMS', 'ROUND_ROBIN')]
(Background on this error at: https://sqlalche.me/e/14/f405)

Implement logout button

The logout button only brings the user to the profile edit page. Without any logging out functionality working.

Add activity logging

We can add activity logging for historic and autdit logging purposes.
Such as when you create/update/delete:

  • Clubs
  • Tournaments
  • Everything within tournaments: matches, teams, players, stages, stage items etc.

And when:

  • Someone creates an account
  • Changes email/password

Add presentation layout for dashboard

It would be nice to add a "presentation layout" to the dashboard (enabled by a checkbox and query parameter) that makes the dashboard font larger and hides settings etc. such that it can be presented on screens at the tournament venue.

Teams logos

Allow teams to have team logos. I'd do this myself, but I don't know how to use Alembic 😅

Why use dev mode on the frontend in production

the docker compose stack specifies to use the following env var in prod "ENVIRONMENT=DEVELOPMENT".

is there any specific reason for it? I would like to not do that because its not advised to run nextjs in that way in production

Add groups functionality

In group stage, matches should be scheduled in separate groups that can come together in a subsequent stage.

Add documentation about usage and purpose

It's not cleaar from description that this software is designed to handle chess tournaments.
I had to install it to figure out it's not the best fit for soccer tournament ;)

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.