{"id":18283377,"url":"https://github.com/ungdev/gala-flux-api","last_synced_at":"2025-04-05T07:30:36.839Z","repository":{"id":43277918,"uuid":"85498856","full_name":"ungdev/gala-flux-api","owner":"ungdev","description":null,"archived":true,"fork":false,"pushed_at":"2023-05-23T00:52:48.000Z","size":1118,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-15T00:18:21.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ungdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-03-19T18:26:20.000Z","updated_at":"2024-03-27T14:19:54.000Z","dependencies_parsed_at":"2024-11-05T13:20:59.365Z","dependency_job_id":null,"html_url":"https://github.com/ungdev/gala-flux-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungdev%2Fgala-flux-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungdev%2Fgala-flux-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungdev%2Fgala-flux-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungdev%2Fgala-flux-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ungdev","download_url":"https://codeload.github.com/ungdev/gala-flux-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305134,"owners_count":20917191,"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","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":[],"created_at":"2024-11-05T13:09:08.522Z","updated_at":"2025-04-05T07:30:35.807Z","avatar_url":"https://github.com/ungdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flux2-server\n\nSever side of the communication system created for the Gala UTT\n\n## Prerequire\n\n* [Yarn](https://yarnpkg.com/lang/en/docs/install/)\n* NodeJS 7\n\n## Steps for dev installation\n\n* Clone the repo\n```\ngit clone https://github.com/ungdev/gala-flux-api\n```\n* install dependencies\n```\ncd gala-flux-api\nyarn\n```\n* Modify the config files\n\nyou have to created .env file based on the .env.example file. and configure it\n```\ncp .env.example .env\n```\n* Try to run the server a first time\n```\nyarn dev\n```\n\n### Fill the database\nTo fill the database with half-random fixtures, run the following command.\n\n```\nnode cli/fixtures.js\n```\n\n## Run With Docker\n```\ndocker-compose build\ndocker-compose up\n```\n\n## Production deployment\nThis app is made to have an auto deployment on master push. The app will be started as a test on travis-ci, which will then trigger the auto-deployment to a dokku server.\n\nTo push on the Dokku server, travis has to get the private ssh key of a dokku user :\n\n```\n# generate new keys\nssh-keygen -f deploy_key\n\n# Use deploy_key.pub to create a new user on dokku that can push to this new repository\ncat deploy_key.pub | ssh dokku@dokku.uttnetgroup.net dokku ssh-keys:add flux2-travis\n\n# Login on travis and encryp key\ntravis login\ntravis encrypt-file deploy_key --add\n\n# Clean unencrypted keys\nrm deploy_key deploy_key.pub\n\n# Add and commit encrypted deploy_key\ngit add deploy_key.enc\n```\n\nOn the dokku app, you can configure EtuUTT api configuration and the JWT secret\n\n```\ndokku config:set api.flux.uttnetgroup.fr DOKKU_APP_NAME=api.flux.uttnetgroup.fr ETUUTT_ID= ETUUTT_SECRET= JWT_SECRET=\ndokku config:set api.flux-dev.uttnetgroup.fr DOKKU_APP_NAME=api.flux-dev.uttnetgroup.fr ETUUTT_ID= ETUUTT_SECRET= JWT_SECRET=\n```\n\n## Create an admin account\nTo start to use the application, you need at least one admin user.\nTo create an admin account from command line, the server has to be stopped. Then run thoses two commands and follow the instructions.\n\n```\nnode cli/createTeam.js # Not needed if you already fill the database with fixtures\nnode cli/createUser.js\n```\n\n## Firebase setup\n\nYou have to generate a config file. [Go here and read the instructions](https://firebase.google.com/docs/admin/setup).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fungdev%2Fgala-flux-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fungdev%2Fgala-flux-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fungdev%2Fgala-flux-api/lists"}