Coder Social home page Coder Social logo

prabhuraaj101 / champagne Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fcrozatier/champagne

0.0 1.0 0.0 2.38 MB

champagne

Home Page: https://champagne-taupe.vercel.app

License: MIT License

JavaScript 2.71% Python 2.55% TypeScript 45.04% CSS 1.55% HTML 0.38% Svelte 47.76%

champagne's Introduction

๐Ÿพ Champagne!

Bubble up and celebrate the outstanding!

What is champagne?

Champagne is a voting platform for massive competitions. It implements a peer ranking algorithm where people vote by comparing pairs of entries to let the best ones bubble up the surface. See NodeRank for more details.

It's the platform used by the Summer of Math Exposition competition, live at some.3b1b.co

Features

  • Register creators-entries pairs and judges. Prevent duplicates (only one sign-up per email) and allow group entries
  • Vote. Signed-up users can vote with a personal link sent by email.
  • The pairing creates a graph. The vote is closed after a deadline is met.
  • Auto cleanup stale comparisons: if a user is assigned a comparison between entries and does not vote after X hours this is reassigned to someone else.
  • Rate limit votes: a user must wait at least X minutes between votes and can make at most Y votes in each categories.
  • Leave feedbacks. Creators can access their feedbacks at the end. Admins can review and validate feedbacks.
  • Detect explicit language in feedbacks
  • Flag inappropriate entries. Admins can review the flagged entries and confirm deletion
  • Deadlines: Sign-up and vote forms are disabled on given dates
  • Runs a PageRank algorithm to rank the entries
  • Protected admin area

Numbers are configurable. See configuration below for more details.

Stack

This project is a SvelteKit app running a Neo4j graph database. To run it locally you need Neo4j Desktop

Configuration

You can use this project by setting these environment variables in your local .env file:

name value description
PUBLIC_REGISTRATION_START yyyy-mm-ddThh:mm:ssZ Registration start date
PUBLIC_REGISTRATION_END yyyy-mm-ddThh:mm:ssZ Registration deadline
PUBLIC_VOTE_START yyyy-mm-ddThh:mm:ssZ Vote start date
PUBLIC_VOTE_END yyyy-mm-ddThh:mm:ssZ Vote deadline
PUBLIC_RESULTS_AVAILABLE yyyy-mm-ddThh:mm:ssZ Results
PUBLIC_RATE_LIMIT number Minimum time delta between votes in minutes
PUBLIC_VOTE_LIMIT float between 0 and 1 Maximum number of votes per user / total entries
ORIGIN string Custom domain
ADMIN_PASSWORD string Admin level access
NEO4J_URI e.g. "neo4j://localhost:7687" neo4j connection string
NEO4J_USERNAME string neo4j user
NEO4J_PASSWORD string neo4j password
S3_KEY string s3 bucket key
S3_SECRET string s3 bucket secret
S3_REGION string s3 region
PUBLIC_S3_ENDPOINT string s3 endpoint
PUBLIC_S3_BUCKET string s3 bucket name
MAILGUN_API_KEY string mailgun config
DOMAIN string mailgun config

You can tweak the competition settings (name and categories) in the $lib/config.ts file. A few additional server configurations are available in $lib/server/config.ts

How to run locally?

  1. Install Neo4j Desktop
  2. Create your local db and install the APOC procedures and the Graph Data Science Library
  3. Set your environment variables in .env
  4. Install the packages npm install
  5. Run the dev server npm run dev
  6. Visit localhost:5173/admin to add the validation constraints to the database and fixtures if you want dummy data

Note: if you want the background auto cleanup of old assigned comparisons in dev mode then you need to visit localhost:5173/admin/db-setup each time you launch neo4j Desktop since the background job is cleared when you close the db

Python tests

To run the graph utilities tests cd graph/ then:

python3 -m venv ./.venv
source .venv/bin/activate
pip install -r requirements.txt
pytest

License

MIT

champagne's People

Contributors

fcrozatier avatar leios avatar

Watchers

 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.