Synapse is a web application that allows users to make predictions for sporting events. Users can make predictions for an event, compete with friends on leaderboards, and track their performance across a season.
- Formula 1 Predictions: Currently implemented for predicting driver results
- User Authentication: Secure account creation and login system
- Prediction System: Make predictions for events before their deadlines
- Auto Populate: Pull season events and race results from the jolpica api
- Points Calculation: Automatic scoring based on prediction accuracy
- Leaderboards: Track your performance against other users
- Season Tracking: View cumulative points across multiple events in a season
- Admin Dashboard: Manage seasons, events, and categories (admin users only)
- Responsive Design: Works on desktop and mobile devices
- Elixir
- Phoenix
- PostgreSQL
- Clone the repository
- Install dependencies and setup the database:
mix setup - Start the Phoenix server:
or inside IEx with:
mix phx.serveriex -S mix phx.server - Visit
localhost:4001from your browser - An admin will need to go in and set up categories, seasons, and events.
Admin users have access to additional functionality for managing the application:
- Season management (create, edit, view seasons)
- Event management (create, edit, view events, set deadlines)
- Category management (create, edit, view categories)
To set a user as an admin, edit their db record, or use the helper function in an interactive elixir session.
# set_admin takes the user_id from the db and the admin bool
$ iex -S mix
iex(1)> Synapse.Accounts.set_admin(1, true)- Move prediction data to jsonb
- Allow predictions over mulitple events
- Add more prediction types
- Add more categories
- Fix season delete
- Update event for f1 include visualization
- Explain the points system for f1
- Make
get_latest_seasonandget_latest_eventtake in a category - Make season lists per category
- Make event lists per season
