{"id":18283204,"url":"https://github.com/ungdev/ua-api","last_synced_at":"2025-04-05T07:30:31.632Z","repository":{"id":45935255,"uuid":"261219492","full_name":"ungdev/UA-api","owner":"ungdev","description":"API web à destination des services de l'UTT Arena","archived":false,"fork":false,"pushed_at":"2025-02-25T07:06:48.000Z","size":56744,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"dev","last_synced_at":"2025-03-20T23:41:46.991Z","etag":null,"topics":["express","hacktoberfest","prisma","typescript","utt-arena"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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":"2020-05-04T15:13:14.000Z","updated_at":"2025-02-25T07:06:52.000Z","dependencies_parsed_at":"2023-10-02T01:07:31.423Z","dependency_job_id":"60087c71-8c42-4a35-9dbc-f12a905aca19","html_url":"https://github.com/ungdev/UA-api","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungdev%2FUA-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungdev%2FUA-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungdev%2FUA-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungdev%2FUA-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ungdev","download_url":"https://codeload.github.com/ungdev/UA-api/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305092,"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":["express","hacktoberfest","prisma","typescript","utt-arena"],"created_at":"2024-11-05T13:08:09.447Z","updated_at":"2025-04-05T07:30:29.226Z","avatar_url":"https://github.com/ungdev.png","language":"TypeScript","readme":"# UA-api\n\n[![Build Status](https://github.com/ungdev/UA-api/actions/workflows/ci.yml/badge.svg)](https://github.com/ungdev/UA-api/actions)\n[![codecov](https://codecov.io/gh/ungdev/UA-API/branch/master/graph/badge.svg)](https://codecov.io/gh/ungdev/UA-API)\n[![Read the Docs](https://readthedocs.org/projects/ua/badge/?version=latest\u0026style=flat)](https://ua.readthedocs.io/)\n\nAPI web à destination des services de l'UTT Arena\n\n**Avant toute chose**, prenez connaissance de [la documentation](https://ua.readthedocs.io).\n\n## Requirements\n\n- [Node.js](https://nodejs.org/)\n- [pnpm](https://pnpm.io/)\n\n## Installation\n\n```\ngit clone git@github.com:ungdev/UA-api.git\n# or\ngit clone https://github.com/ungdev/UA-api.git\n\ncd UA-api\n\n# Install all the dependencies\npnpm install\n\n# Copy the file .env.example to .env\n\ncp .env.example .env\n\n# Then, edit the variable DATABASE_URL in the file .env\n```\n\nThen, connect to your database (MySQL/MariaDB) and enter\n\n```\nCREATE DATABASE arena CHARACTER SET utf8;\n```\n\nCreate the tables\n\n```\npnpm prisma db push\n```\n\nPopulate the tables\n\n```\nmysql -u DATABASE_USER -p arena --protocol tcp \u003c seed.sql\n```\n\nGenerate the prisma client (redo this command when you update schema.prisma)\n\n```\npnpm prisma generate\n```\n\n## Configuration\n\nEdit the file .env with your values\n\n## Commands\n\n```\npnpm dev              # start development server\npnpm build            # builds the typescript to javascript\npnpm start            # start production server\npnpm lint             # checks if the code is correct\npnpm lint-fix         # try to fix lint errors and warnings\npnpm fake             # populate the database with fake data\npnpm schema:push      # push the schema.prisma to the database\npnpm test:schema:push # push the schema.prisma to the test database (done automatically in tests)\n```\n\n## Prisma config\n\nUse `npx prisma generate` to generate your prisma client\n\n## How to test\n\nThe tests must be able to run without any environment variables except the database\n\n### Change the database for tests\n\nCreate a new `.env.test` file that will override values from `.env` :\n\n```\ncp .env.test.example .env.test\n```\n\nChange the database name to `arena_test`. Change the credentials too, like in the `.env` file.\n\nOpen MySQL/MariaDB, and run the following command to create the database :\n\n```\nCREATE DATABASE arena_test CHARACTER SET utf8;\n```\n\nWhat follows is mostly there for information purposes. It is done automatically during the tests. From what we know, there is no reason to use these commands.\nCome back to your terminal :\n\n```\n# Push the schema to the database :\npnpm test:schema:push\n\n# Seed the database :\nmysql -u DATABASE_USER -p arena_test --protocol tcp \u003c seed.sql\n```\n\n### Run the tests\n\n```\npnpm test\n```\n\n# Documentation\n\nWe build the documentation with Sphinx based on markdown. If you want to compile the documentation on your local PC, you will need to have `Python 3` and then type the following commands:\n\n```\ncd docs\npip3 install -r requirements.txt\nmake html\n```\n\nIt will create a `build` folder where the doc is located\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fungdev%2Fua-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fungdev%2Fua-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fungdev%2Fua-api/lists"}