{"id":15147620,"url":"https://github.com/tenosiswono/auction","last_synced_at":"2025-07-26T05:18:45.384Z","repository":{"id":168848569,"uuid":"619910134","full_name":"tenosiswono/auction","owner":"tenosiswono","description":"Sample T3 stacks about auction online system, exercise project","archived":false,"fork":false,"pushed_at":"2023-04-02T01:17:28.000Z","size":4119,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T09:48:51.258Z","etag":null,"topics":["inngest","nextjs","pusherjs","react-query","supabase","t3-stack","trpc","typescript"],"latest_commit_sha":null,"homepage":"https://auction.teno.dev","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/tenosiswono.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}},"created_at":"2023-03-27T16:49:43.000Z","updated_at":"2025-02-28T11:56:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"f739e50c-f1ed-4412-a8c0-60966b86d5ca","html_url":"https://github.com/tenosiswono/auction","commit_stats":{"total_commits":42,"total_committers":2,"mean_commits":21.0,"dds":"0.11904761904761907","last_synced_commit":"45eff1cb3c2b136dffa2111e382249c86886f6b0"},"previous_names":["tenosiswono/auction"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tenosiswono/auction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenosiswono%2Fauction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenosiswono%2Fauction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenosiswono%2Fauction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenosiswono%2Fauction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tenosiswono","download_url":"https://codeload.github.com/tenosiswono/auction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenosiswono%2Fauction/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267122692,"owners_count":24039447,"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-07-26T02:00:08.937Z","response_time":62,"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":["inngest","nextjs","pusherjs","react-query","supabase","t3-stack","trpc","typescript"],"created_at":"2024-09-26T13:00:19.104Z","updated_at":"2025-07-26T05:18:45.334Z","avatar_url":"https://github.com/tenosiswono.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [AuctionHive](https://auction.teno.dev)\n\n[![codecov](https://codecov.io/gh/tenosiswono/auction/branch/main/graph/badge.svg?token=34SH7KLJZ1)](https://codecov.io/gh/tenosiswono/auction)\n\nRealtime Auction System\n\nhttps://auction.teno.dev\n\n## Setup\nTo get started with the project, follow these steps:\n```bash\ngit clone git@github.com:tenosiswono/auction.git\n```\nNavigate to the project directory.\n```bash\ncd auction\n```\nInstall the dependencies.\n```bash\nnpm install\n```\nCreate an environment file.\n```bash\ncp env.example .env\n```\nEdit the environment file and fill in your postgres connection string\n```bash\n# Prisma DB\nDATABASE_URL=\"postgres://\u003cusername\u003e:\u003cpassword\u003e@\u003curl\u003e:\u003cport\u003e/\u003cpath\u003e\"\n```\nEdit the environment file and fill in coresponding `#supabase` env from [Supabase](https://supabase.com/) project\n```bash\n#supabase\nSUPABASE_DOMAIN=odfdyvontbfhssqawmbj.supabase.co\nSUPABASE_URL=https://\u003cyour-project\u003e.supabase.co\nSUPABASE_KEY=\nSUPABASE_BUCKET=\u003cbucket-name\u003e\nIMAGE_SERVER=https://\u003cyour-project\u003e.supabase.co/storage/v1/object/public/bucket-name\n```\nEdit the environment file and fill in coresponding `#inngest` env from [Inngest](https://www.inngest.com/) project \n```bash\n#inngest\nINNGEST_EVENT_KEY=\"local\"\nINNGEST_SIGNING_KEY=\u003cyour-signing-key\u003e\n```\nEdit the environment file and fill in coresponding `#pusher` env from [Pusher](https://pusher.com/) project \n```bash\n#pusher\nPUSHER_APP_ID=\"\"\nNEXT_PUBLIC_PUSHER_KEY=\"\"\nPUSHER_SECRET=\"\"\nNEXT_PUBLIC_PUSHER_CLUSTER=\"\"\n```\nMigrate Prisma DB\n```bash\nnpx prisma migrate dev\n```\nStart the web development server.\n```bash\nnpm run dev\n```\nOpen on your browser `http://localhost:3000`\n## Test\n- [x] Frontend Unit Test\n- [x] Server Unit Test\n- [ ] End-to-end Test\n- [ ] DB Test\n\nTo run the test\n```bash\nnpm run test\n```\nTo collect coverage of the test\n```bash\nnpm run coverage\n```\nTo lint on sources\n```bash\nnpm run lint\n```\n## Architecture\n\n### Stacks\n\n- [Next.js](https://nextjs.org) Base Framework\n- [NextAuth.js](https://next-auth.js.org) Authentication\n- [Prisma](https://prisma.io) DB Orm\n- [Tailwind CSS](https://tailwindcss.com) CSS framework\n- [tRPC](https://trpc.io) end-to-end typesafe APIs\n- [Supabase](https://supabase.com/) Uploading Image, and Postgres Server\n- [Inngest](https://www.inngest.com/) Ship Background Jobs, Crons, Webhooks, and Workflows\n- [Vitest](https://vitest.dev/) Test Framework\n- [Pusher](https://pusher.com/) Websocket to handle realtime data\n\n### ERD\n```mermaid\nerDiagram\n\tAuction {\n\t\tString id PK  \"cuid()\"\n\t\tString title\n\t\tString image\n\t\tFloat startingPrice\n\t\tFloat currentPrice\n\t\tInt duration\n\t\tDateTime startDate  \"nullable\"\n\t\tDateTime endDate  \"nullable\"\n\t\tDateTime createdAt  \"now()\"\n\t\tDateTime updatedAt  \"now()\"\n\t\tString creatorId FK\n\t\tString status\n\t\tString winnerId FK  \"nullable\"\n\t}\n\tBid {\n\t\tString id PK  \"cuid()\"\n\t\tFloat amount\n\t\tString bidderId FK\n\t\tString auctionId FK\n\t\tDateTime createdAt  \"now()\"\n\t\tDateTime updatedAt  \"now()\"\n\t}\n\tDepositHistory {\n\t\tString id PK  \"cuid()\"\n\t\tString userId FK\n\t\tFloat amount\n\t\tString status\n\t\tDateTime createdAt  \"now()\"\n\t\tDateTime updatedAt  \"now()\"\n\t}\n\tAccount {\n\t\tString id PK  \"cuid()\"\n\t\tString userId FK\n\t\tString type\n\t\tString provider\n\t\tString providerAccountId\n\t\tString refresh_token  \"nullable\"\n\t\tString access_token  \"nullable\"\n\t\tInt expires_at  \"nullable\"\n\t\tString token_type  \"nullable\"\n\t\tString scope  \"nullable\"\n\t\tString id_token  \"nullable\"\n\t\tString session_state  \"nullable\"\n\t}\n\tSession {\n\t\tString id PK  \"cuid()\"\n\t\tString sessionToken\n\t\tString userId FK\n\t\tDateTime expires\n\t}\n\tUser {\n\t\tString id PK  \"cuid()\"\n\t\tString name  \"nullable\"\n\t\tString email  \"nullable\"\n\t\tDateTime emailVerified  \"nullable\"\n\t\tString image  \"nullable\"\n\t\tString password\n\t\tFloat deposit\n\t}\n\tVerificationToken {\n\t\tString identifier\n\t\tString token\n\t\tDateTime expires\n\t}\n\tAuction }o--|| User : creator\n\tAuction }o--|| User : winner\n\tBid }o--|| User : bidder\n\tBid }o--|| Auction : auction\n\tDepositHistory }o--|| User : user\n\tAccount }o--|| User : user\n\tSession }o--|| User : user\n\n```\n### Auciton Creator Sequence Diagram\n```mermaid\nsequenceDiagram\n    participant Creator\n    participant AuctionSystem\n    participant InngestJobWorker\n\n    Creator-\u003e\u003eAuctionSystem: Create Auction\n    AuctionSystem--\u003e\u003eCreator: Auction Created\n    Creator-\u003e\u003eAuctionSystem: Publish Auction\n\t\tAuctionSystem-\u003e\u003eInngestJobWorker: Create Scheduller at endDate\n    AuctionSystem--\u003e\u003eCreator: Auction Published\n\n    Note left of InngestJobWorker: After Scheduller at endDate\n\t\tInngestJobWorker-\u003e\u003eAuctionSystem: Update auction to complete, select winner, refund lost bidder\n\n```\n### Auction Bidder Sequence Diagram\n```mermaid\n\nsequenceDiagram\n    participant Bidder1\n    participant Bidder2\n    participant AuctionSystem\n\n\t\tBidder1-\u003e\u003eAuctionSystem: Bid on Auction 1, price: 100\n\t\tAuctionSystem-\u003e\u003eBidder1: Update on websocker currentPrice 100\n\t\tAuctionSystem-\u003e\u003eBidder2: Update on websocker currentPrice 100\n\t\tBidder2-\u003e\u003eAuctionSystem: Bid on Auction 1, price: 200\n\t\tAuctionSystem-\u003e\u003eBidder1: Update on websocker currentPrice 200\n\t\tAuctionSystem-\u003e\u003eBidder2: Update on websocker currentPrice 200\n```\n### Design \n\n![Home](docs/scr.png?raw=true \"Home\")\n![List](docs/list.png?raw=true \"List\")\n\nInspired by [ClickBids. A new way of winning in 11 clicks](https://www.behance.net/gallery/150684529/ClickBids-A-new-way-of-winning-in-11-clicks)\n\n# License\n## MIT License\n\nCopyright (c) 2023 Teno Siswono\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftenosiswono%2Fauction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftenosiswono%2Fauction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftenosiswono%2Fauction/lists"}