{"id":29798260,"url":"https://github.com/leodubosclard/lottery","last_synced_at":"2026-04-16T19:38:15.027Z","repository":{"id":288239006,"uuid":"610980997","full_name":"leodubosclard/lottery","owner":"leodubosclard","description":":alarm_clock: New bet every day at 9:00 AM !","archived":false,"fork":false,"pushed_at":"2023-03-27T13:20:52.000Z","size":1857,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T07:31:10.020Z","etag":null,"topics":["app","application","express","firebase-auth","firestore","lottery","oauth2","react","typescript","web"],"latest_commit_sha":null,"homepage":"https://coruscating-pie-4c0023.netlify.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leodubosclard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-07T21:39:14.000Z","updated_at":"2023-03-23T17:00:36.000Z","dependencies_parsed_at":"2025-04-16T11:57:36.925Z","dependency_job_id":null,"html_url":"https://github.com/leodubosclard/lottery","commit_stats":null,"previous_names":["leodubosclard/lottery"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leodubosclard/lottery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodubosclard%2Flottery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodubosclard%2Flottery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodubosclard%2Flottery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodubosclard%2Flottery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leodubosclard","download_url":"https://codeload.github.com/leodubosclard/lottery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leodubosclard%2Flottery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278366597,"owners_count":25975091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app","application","express","firebase-auth","firestore","lottery","oauth2","react","typescript","web"],"created_at":"2025-07-28T07:15:02.837Z","updated_at":"2025-10-04T19:37:05.314Z","avatar_url":"https://github.com/leodubosclard.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lottery\n\n## Description\n\n**Lottery** is an online betting application (like Loto in France).\n\nBets are available for a **limited** time and users can choose up to **5 numbers** from a grid ranging from 1 to 20. At the end of the betting time.\n\nUsers can **claim their prize** with a **multiplier** according to the number of numbers corresponding to those of the bet (randomly chosen during creation)\n\nmultipliers -\u003e good numbers: 1 -\u003e 5; 0.8 -\u003e 4; 0.6 -\u003e 3 ; 0.4 -\u003e 2; 0.2 -\u003e 1; 0 -\u003e 0\n\n## Stack\n\n### Frontend\n- [React](https://reactjs.org/)\n- [TypeScript](https://www.typescriptlang.org/)\n- [Chakra-UI](https://chakra-ui.com/)\n\n### Backend\n- [TypeScript](https://www.typescriptlang.org/)\n- [NodeJS](https://nodejs.org/)\n- [Express](https://www.expressjs.com/)\n- [Firebase](https://firebase.google.com/)\n\n### Database\n- [Firestore](https://firebase.google.com/docs/firestore/)\n\n### Tasks queue\nI use cron job to create 1 new game every day at 9:00 AM and execute games every hour.\n\n## Installation\n\nTo use lottery at home, please follow the instructions bellow at the root of the project\n\n### Frontend\n\n```bash\ncd lottery_app/\nyarn install\n# -\u003e Setup .env file on your side using .env.example file\n# -\u003e Setup res/firebase-config.json on your side using res/firebase-config.json.example file\n# -\u003e Setup res/lottery-server.json on your side using res/lottery-server.json.example file\nyarn start\n```\n\n### Backend\n\n```bash\ncd lottery_server/\nyarn install\n# -\u003e Setup .env file on your side using .env.example file\n# -\u003e Setup res/firebase-config.json on your side using res/firebase-config.json.example file\n# -\u003e Setup res/lottery-server.json on your side using res/lottery-server.json.example file\nyarn dev\n```\n\n### Tasks queue\nCron jobs:\n - src/tasks/newGame.ts: Every day at 9:00 AM\n - src/tasks/execGame.ts: Every hour\n\n## Backend routes\n\n|Route|Method|Protected|Description|\n|-----|------|---------|-----------|\n|`/auth`|POST|NO|Register or login user|\n|||||\n|||||\n|`/user`|GET|YES|Get user profile|\n|`/user`|DELETE|YES|Delete user|\n|`/user`|PUT|YES|Update user|\n|`/user/getGames`|GET|YES|Get all games played by a user filtered by game creation date|\n|||||\n|||||\n|`/game/getAll`|GET|YES|Get all available games|\n|`/game/new/:gameId`|POST|YES|Participate to a game|\n|`/game/claim/:gridId`|POST|YES|Claim prize for an old grid|\n\n### Tasks\n`execGame` -\u003e Execute game\n\n`newGame` -\u003e Create a new game\n\n## Frontend screens\n\n[-\u003e Go to frontend Readme](https://github.com/ZerLock/lottery/tree/main/lottery_app)\n\n## Mainteners\n\n- [Léo Dubosclard](https://linkedin.com/in/leo-dubosclard/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleodubosclard%2Flottery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleodubosclard%2Flottery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleodubosclard%2Flottery/lists"}