{"id":29040422,"url":"https://github.com/ptkr0/keipai","last_synced_at":"2025-06-26T14:06:05.851Z","repository":{"id":288112198,"uuid":"935601179","full_name":"ptkr0/KeiPai","owner":"ptkr0","description":"KeiPai is a web application as a social networking site for game developers and influencers.","archived":false,"fork":false,"pushed_at":"2025-05-29T18:54:44.000Z","size":1813,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T14:05:25.278Z","etag":null,"topics":["angular","azure","csharp","daisyui","dotnet","mssql","typescript"],"latest_commit_sha":null,"homepage":"","language":"C#","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/ptkr0.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,"zenodo":null}},"created_at":"2025-02-19T17:55:48.000Z","updated_at":"2025-05-29T18:59:54.000Z","dependencies_parsed_at":"2025-04-20T04:45:45.059Z","dependency_job_id":null,"html_url":"https://github.com/ptkr0/KeiPai","commit_stats":null,"previous_names":["ptkr0/keipai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ptkr0/KeiPai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptkr0%2FKeiPai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptkr0%2FKeiPai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptkr0%2FKeiPai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptkr0%2FKeiPai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptkr0","download_url":"https://codeload.github.com/ptkr0/KeiPai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptkr0%2FKeiPai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262081117,"owners_count":23255662,"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":["angular","azure","csharp","daisyui","dotnet","mssql","typescript"],"created_at":"2025-06-26T14:05:24.935Z","updated_at":"2025-06-26T14:06:05.819Z","avatar_url":"https://github.com/ptkr0.png","language":"C#","readme":"![KeiPai logo](./assets/KEIPAI_DARK.svg \"KeiPai logo\")\n\n# KeiPai\n## About\n\n**KeiPai is a web application as a social networking site for game developers and influencers.**\n\n\nThe idea behind this app was to mimic platforms such as [Keymailer](https://keymailer.co), [Lurkit](https://lurkit.com) and [Woovit](https://woovit.com).\n\nThis repository contains both server and client related files, which should let you host your own instance of this application.\n\n## Features\n\n### As a developer:\n* Add games to your library\n* Manage keys to each game\n* Start promotial campaigns for your games\n    * Select between manual and automatic key distribution system\n    * Set start-date and end-date\n    * Set minimum requeirements for each social media platform\n    * Add a description with markdown support\n    * Set key limit for each game platform\n* Accept or decline incoming requests\n* Monitor your campaign statistics\n* Visit influencer profiles and check their YouTube videos and Twitch streams\n* Review influencers you worked with\n* Send private messages between other developers and influencers\n\n### As an influencer:\n* Connect your YouTube and Twitch accounts\n* Browse available campaigns and filter them by:\n    * Tags\n    * Platforms\n* Send requests to join campaigns\n* System automatically detects if you uploaded video or livestream onto selected platform\n* Visit developer profiles and check uploaded games and running campaigns\n* Send private messages between other influencers and developers\n\n### System features:\n* User verification with OAuth 2.0\n* Accurate content data with the official YouTube and Twitch APIs\n* JWT stored safely in cookies\n* File storage with Azure Blob Storage\n* Real-time communication with Twitch servers via webhooks\n\n## Tech Stack\nServer: .NET 8.0, Entity Framework Core  \nDatabase: MS SQL, Azure Blob Storage  \nClient: Angular 18, Tailwind CSS, daisyUI\n\n## Prerequisites\n\n### Part 1: Aquiring credentials\nFor the app to work properly you need to generate both [YouTube](https://youtube.com) and [Twitch](https://twitch.tv) OAuth Client Credentials. You also need [Azure Blob Storage](https://azure.microsoft.com/products/storage/blobs) connection string to store images. If you also want to test out Twitch functionality locally you need to create a [ngrok](https://ngrok.com) account and generate a static domain.\n\n**Twitch OAuth Client Credentials**\n1. Create an account and login on [Twitch Developers](https://dev.twitch.tv)\n2. Click on `Your Console` button in the upper right corner\n3. Click on the `Register Your Application` button\n4. Fill out form with following informations:\n    * Name -- can be anything e.g. KeiPai\n    * OAuth redirect URI -- http://localhost:4200/twitch-success\n    * Category -- Website Integration\n    * Client Type -- confidential\n5. Submit form and click on the generated application\n6. Copy generated Client ID and Client Secret\n\n**YouTube OAuth Client Credentials**\n1. Create an account and login on [Google Cloud](https://cloud.google.com)\n2. Click on `Console` button in the upper right corner\n3. Create a new Project, you can name it anyway you want\n4. After project gets created select it\n5. From navigation menu choose `APIs \u0026 Services`\n6. Navigate to `Library` and search for `YouTube Data API v3`, then select and enable it\n7. Go back and and select `OAuth consent screen`\n8. Click on the `Get Started` button\n9. Fill out the form with following informations:\n    * App name -- can be anything e.g. KeiPai\n    * User support email -- select your email\n    * Audience -- External\n    * Contact Information -- enter your own email address\n10. Submit form\n11. Select `Audience` tab and add your email as a test user\n12. Select `Data Access` tab and click on the `Add Or Remove Scopes`\n13. From list select scopes: `.../auth/userinfo.email` and `../auth/youtube.readonly`\n14. Update changes\n15. Select `Clients` tab and click on the `Create Client` button\n16. Fill out the form with these informations:\n    * Application type -- Web application\n    * Name -- can be anything e.g. KeiPai\n    * Authorized JavaScript origins -- http://localhost:4200\n    * Authorized redirect URIs -- http://localhost:4200/youtube-success\n17. Submit form and click on the download icon on the generated client\n18. Copy generated Client ID and Client Secret\n\n**Azure Blob Storage Connection String**\n1. Create an account and login on [Microsoft Azure](https://azure.microsoft.com)\n2. Click on `Create a resource` button\n3. Select from categories `Storage` and click on `Create` under `Storage account`\n4. Fill out the form with following informations:\n    * Subscription -- choose any available\n    * Resource group -- can be anything e.g. KeiPai\n    * Storage account name -- can be anything e.g. keipaistorage\n    * Region -- best to choose recommended one\n    * Primary service -- Azure Blob Storage or Azure Data Lake Storage Gen 2\n    * Performance -- Standard\n    * Redundancy -- Locally-redundant storage (LRS)\n5. Leave all the remaining fields as they are and complete the setup\n6. After finishing deployment click on `Go to resource` button\n7. Under the properties section click on `Blob service` text\n8. Click on the `Container` button and name the new container `images`\n9. Go back to Resource and from the list on the left side of the screen select `Security + networking` and `Access keys`\n10. Copy one of the available Connection Strings\n\n**ngrok static domain**  \n*This step is only required if you are going to test out locally Twitch integration*\n1. Create an account and login on https://ngrok.com\n2. In the dashboard choose option `Domains` under the `Universal Gateway` section\n3. Click on the `New Domain` button\n4. Copy created domain\n\n### Part 2: Installing necessary software\n\n**1. Install .NET 8 SDK**\n* Download and install the .NET 8 SDK from the official [.NET download page](https://dotnet.microsoft.com/download/dotnet/8.0)\n\n**2. (Optionally) Install Visual Studio 2022**\n* Download and install Visual Studio 2022 from the official [Visual Studio download page](https://visualstudio.microsoft.com/downloads/)\n* During installation ensure you select the following workloads:\n    * ASP.NET and web development\n    * .NET desktop development\n\n**3. Install SQL Server**\n* Download and install SQL Server from the official [SQL Server download page](https://www.microsoft.com/sql-server/sql-server-downloads)\n\n**4. Install SQL Server Management Studio (SSMS) for easier database management**\n* Download and install SSMS from the official [SQL Server Management Studio download page](https://learn.microsoft.com/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver16)\n\n**5. Install Node.js**\n* Download and install Node.js from the official [Node.js download page](https://nodejs.org/en/download)\n\n**6. (Optionally) Install ngrok**\n* Download, install and configure ngrok from the official [ngrok download page](https://ngrok.com/downloads/windows)\n\n## Installation\n\n**1. Download or clone this repository**\n```bash\ngit clone https://github.com/ptkr0/KeiPai.git\n```\n\n**2. Navigate to server directory**\n```bash\ncd \u003cKeiPai/server\u003e\n```\n\n**3. Install all the NuGet Packages**\n* Restore the NuGet packages by running:\n```bash\ndotnet restore\n```\n\n* (Alternatively) Open solution file (`.sln`) in Visual Studio 2022\n* Restore the NuGet packages by right-clicking on the solution in the Solution Explorer and selecting \"Restore NuGet Packages\"\n\n**4. Set up the database**\n* Open SSMS and connect to your SQL Server instance\n* In Object Explorer, right-click on `Databases` and select `New Database` option\n* Enter your database name e.g. keipai\n* Click `OK`\n* Right-click on created database and select `Properties` option\n* Copy `Name` and `Owner` (copy only machine name e.g. DESKTOP-38EFFIN) values\n\n**5. Set up the appsettings.json**\n* Inside KeiPai/server directory create a new file called `appsettings.json`\n* Using `appsettings - example.json` file as an example and fill with necessary data created in previous steps\n\n**6. Apply the migration**\n* Apply migrations and create the database by running:\n```bash\ndotnet ef database update\n```\n* If operation fails, try installing `dotnet ef` tool by running:\n```bash\ndotnet tool install --global dotnet-ef --version 8.0.0\n```\n\n**7. Navigate to client directory**\n```bash\ncd \u003cKeiPai/client\u003e\n```\n\n**8. Install the required npm packages**\n* Install all the necessary packages by running:\n```bash\nnpm install\n```\n\n**9. Configure client environment file**\n* Navigate to the environments directory\n```bash\ncd \u003cKeiPai/src/client/environments\u003e\n```\n* Create a new file called `environment.development.ts`\n* Using `environment.development - example` file as an example and fill with necessary data created in previous steps\n\n## Usage\n\n1. Start the server by running the following command with terminal inside the server directory:\n```bash\ndotnet run\n```\n* Server should start running on `https://localhost:7157` -- if it runs on different port be sure to update `environment.development.ts` accordingly\n* (Alternatively) Open solution file (`.sln`) from the server directory in Visual Studio 2022\n* Press F5 to start the project\n\n2. Start the client by running the following command with terminal inside the client directory:\n```bash\nnpm start\n```\n* Client should start running on `localhost:4200` -- if it runs on different port be sure to update `appsettings.json` accordingly\n\n3. (Optionally) Start ngrok by running:\n```bash\nngrok http --url=\u003cgenerated-domain\u003e \u003chttps://localhost:7157\u003e\n```\n\n## Screenshots\n\n| ![](./assets/main-page.png)|\n|:--:| \n| *Welcome page* |\n\n| ![](./assets/login.png)|\n|:--:| \n| *Login* |\n\n| ![](./assets/register-dialog.png)|\n|:--:| \n| *Register dialog option* |\n\n| ![](./assets/register-developer.png)|\n|:--:| \n| *Register as developer* |\n\n| ![](./assets/register-influencer.png)|\n|:--:| \n| *Register as influencer* |\n\n| ![](./assets/game-list.png)|\n|:--:| \n| *Game list* |\n\n| ![](./assets/add-game.png)|\n|:--:| \n| *Add game* |\n\n\n| ![](./assets/game-page.png)|\n|:--:| \n| *Game page* |\n\n| ![](./assets/all-keys.png)|\n|:--:| \n| *Game keys page* |\n\n| ![](./assets/add-keys.png)|\n|:--:| \n| *Add keys* |\n\n| ![](./assets/campaign-list.png)|\n|:--:| \n| *Campaign list* |\n\n| ![](./assets/add-campaign.png)|\n|:--:| \n| *Add campaign* |\n\n| ![](./assets/campaign-page.png)|\n|:--:| \n| *Campaign page* |\n\n| ![](./assets/request-list.png)|\n|:--:| \n| *Pending requests list* |\n\n| ![](./assets/campaign-stats.png)|\n|:--:| \n| *Campaign statistics* |\n\n| ![](./assets/review-dialog.png)|\n|:--:| \n| *Review dialog* |\n\n| ![](./assets/available-campaigns.png)|\n|:--:| \n| *Available campaigns* |\n\n| ![](./assets/settings.png)|\n|:--:| \n| *Settings page* |\n\n| ![](./assets/settings2.png)|\n|:--:| \n| *Settings page* |\n\n| ![](./assets/send-request.png)|\n|:--:| \n| *Send request dialog* |\n\n| ![](./assets/pending-requests.png)|\n|:--:| \n| *Pending requests* |\n\n| ![](./assets/accepted-requests.png)|\n|:--:| \n| *Accepted requests* |\n\n| ![](./assets/completed-requests.png)|\n|:--:| \n| *Completed requests* |\n\n| ![](./assets/developer-profile.png)|\n|:--:| \n| *Developer profile* |\n\n| ![](./assets/influencer-profile.png)|\n|:--:| \n| *Influencer profile* |\n\n| ![](./assets/private-messages.png)|\n|:--:| \n| *Private messages* |\n\n## Made by\n\nPiotr Radziszewski  \n\n*MyPHPoL™ 2024-2025*","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptkr0%2Fkeipai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptkr0%2Fkeipai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptkr0%2Fkeipai/lists"}