{"id":49536753,"url":"https://github.com/jackmisner/botaniclash","last_synced_at":"2026-05-02T11:49:48.787Z","repository":{"id":288052495,"uuid":"966667528","full_name":"jackmisner/botaniclash","owner":"jackmisner","description":"A plant-based card battling game with data from Trefle.io API","archived":false,"fork":false,"pushed_at":"2025-04-25T10:43:31.000Z","size":28703,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-02T11:49:31.838Z","etag":null,"topics":["css","gin","golang","postgresql","reactjs","restful-api","trefle-plants-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jackmisner.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":"2025-04-15T09:16:49.000Z","updated_at":"2025-05-15T16:27:26.000Z","dependencies_parsed_at":"2025-04-15T10:49:35.485Z","dependency_job_id":null,"html_url":"https://github.com/jackmisner/botaniclash","commit_stats":null,"previous_names":["jackmisner/botaniclash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jackmisner/botaniclash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackmisner%2Fbotaniclash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackmisner%2Fbotaniclash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackmisner%2Fbotaniclash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackmisner%2Fbotaniclash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackmisner","download_url":"https://codeload.github.com/jackmisner/botaniclash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackmisner%2Fbotaniclash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32533344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T11:28:32.350Z","status":"ssl_error","status_checked_at":"2026-05-02T11:27:30.140Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["css","gin","golang","postgresql","reactjs","restful-api","trefle-plants-api"],"created_at":"2026-05-02T11:49:46.071Z","updated_at":"2026-05-02T11:49:48.774Z","avatar_url":"https://github.com/jackmisner.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌿 BotaniClash\n\nA plant-based card game where players battle with plant stats! Players collect plant cards and compete by comparing various attributes like soil pH range, light requirements, and nutrient needs.\n\n## 🎮 About the Game\n\nBotaniClash is a strategic card game using real plant data from the Trefle API. Players:\n- Battle with cards representing different plant species\n- Choose which plant attribute to compare in each round\n- Win cards from opponents when their plant has better stats\n- Track their game statistics on the leaderboard\n\n## 🏗️ Project Structure\n\nThis repo contains two applications:\n\n- 🖥️ A frontend React App - User interface for the game\n- 🔌 A backend API server - Go-based server handling game logic and plant data\n\nThese two applications communicate through HTTP requests and need to be run separately.\n\n## 📋 Requirements\n\n- Node.js (v20+) \n- Go (latest version)\n- PostgreSQL\n\n## 🚀 Quickstart\n\n### 📥 Install Node.js\n\nIf you haven't already, make sure you have node and NVM installed.\n\n1. Install Node Version Manager (NVM)\n   ```\n   brew install nvm\n   ```\n   Then follow the instructions to update your `~/.bash_profile`.\n2. Open a new terminal\n3. Install the latest version of Node.js\n   ```\n   nvm install 20\n   ```\n\n### 📥 Install Go\n\nFollow the instructions here: https://go.dev/doc/install\n\n### 🛠️ Set up your project\n\n1. Have one team member fork this repository\n2. Every team member clone the fork to their local machine\n3. Install dependencies for both the `frontend` and `api` applications:\n   ```\n   cd frontend\n   npm install\n   cd ../api\n   go get .\n   ```\n4. Install an ESLint plugin for your editor, for example\n   [ESLint for VSCode](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n5. Start PostgreSQL\n\n   ```\n   brew services start postgresql\n   ```\n\n6. Create your databases:\n   ```\n   createdb botaniclash\n   createdb botaniclash_test\n   ```\n\n### ⚙️ Setting up environment variables\n\nWe need to create two `.env` files, one in the frontend and one in the api (and also a .env.test file for the api)\n\n#### Frontend\n\nCreate a file `frontend/.env` with the following contents:\n\n```\nVITE_BACKEND_URL=\"http://localhost:8082\"\n```\n\n#### Backend\nYou'll need to sign up for a trefle account to get an API key. You must keep this private. Never put your key in any file outside the .env!\n\nCreate a file `api/.env` with the following contents:\n\n```\nPOSTGRES_URL=\"postgresql://localhost:5432/botaniclash\"\nJWT_SECRET=\"secret\"\nTREFLE_API_TOKEN=\"your api token here\"\n```\n\n#### Backend Test Environment\n\nCreate a file `api/.env.test` with the following contents:\n\n```\nPOSTGRES_URL=\"postgresql://localhost:5432/botaniclash_test\"\nJWT_SECRET=\"test_secret\"\n```\n\nThis separate test database ensures your tests don't interfere with your development data.\n\n## 🌱 Seeding the Database\n\nBefore running the application for the first time, you need to seed the database with plant data:\n\n1. Make sure you're in the `api` directory:\n```\ncd api\n```\n\n2. Seed the database using either method:\n```\ngo run main.go seed\n```\n\nOR\n\n```\ngo build\n./api seed\n```\n\nThis process will:\n- Drop existing tables (if any)\n- Create fresh tables\n- Populate them with plant data from the Trefle API\n\n**Warning:** Running this command will erase any existing data in your database. Only use it when setting up for the first time or if you want to reset all data.\n\n## 🏃‍♂️ Running the Application\n\n1. Start the server application (in the `api` directory):\n\n```\ncd api\ngo run main.go\n```\n\n2. Start the front end application (in the `frontend` directory)\n\nIn a new terminal session:\n\n```\ncd frontend\nnpm run dev\n```\n\nYou should now be able to open your browser and go to `http://localhost:5173/signup` to create a new user.\n\nAfter signing up, you can log in by going to `http://localhost:5173/login` and start playing!\n\n\n## 🧪 Running Tests\n\nTo run the Go backend tests:\n\n```\ncd api\ngo test ./... | grep -v '\\[no test files\\]'\n```\n\nFor verbose output:\n\n```\ngo test -v ./... | grep -v '\\[no test files\\]'\n```\n\nTo force running tests instead of using cached results:\n\n```\ngo test -count=1 ./... | grep -v '\\[no test files\\]'\n```\n\n## 🙏 Credits\nThis project uses data from Trefle, a plants API. See their website here: https://trefle.io/\n\nThank you Trefle!\n\n## 📌 Card Wall\n- [link here](https://trello.com/b/KIUyGIWL/botaniclash-board)\n\n## 👥 Contributors\n- [@jackmisner](https://github.com/jackmisner)\n- [@lukehoweth](https://github.com/LukeHoweth)\n- [@abbiefinlayson1](https://github.com/abbiefinlayson1)\n- [@Michal-P-1](https://github.com/Michal-P-1)\n- [@AMcGill3](https://github.com/AMcGill3)\n- [@I-Lovell](https://github.com/I-Lovell)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackmisner%2Fbotaniclash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackmisner%2Fbotaniclash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackmisner%2Fbotaniclash/lists"}