{"id":21070866,"url":"https://github.com/codebatine/gochain","last_synced_at":"2026-04-12T22:50:59.958Z","repository":{"id":246774852,"uuid":"822072077","full_name":"codebatine/gochain","owner":"codebatine","description":"A cryptocurrency blockchain app with transaction management, mining, wallet, user admin, database, tdd and more.","archived":false,"fork":false,"pushed_at":"2024-08-01T15:58:37.000Z","size":28505,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T21:56:54.874Z","etag":null,"topics":["blockchain","blockchain-nodes","javascript","jwt","mining","mining-rewards","model-view-controller","mongodb","nodejs","react-vite","redis-server","scss","secure-server","separation-of-concerns","tdd","transaction-management","validation","vitest"],"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/codebatine.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":"2024-06-30T08:27:51.000Z","updated_at":"2024-08-01T15:58:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f7b71ca-7ded-45f2-a922-6a4d3f75cc0d","html_url":"https://github.com/codebatine/gochain","commit_stats":null,"previous_names":["codebatine/gochain"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebatine%2Fgochain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebatine%2Fgochain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebatine%2Fgochain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebatine%2Fgochain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebatine","download_url":"https://codeload.github.com/codebatine/gochain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243513958,"owners_count":20303042,"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":["blockchain","blockchain-nodes","javascript","jwt","mining","mining-rewards","model-view-controller","mongodb","nodejs","react-vite","redis-server","scss","secure-server","separation-of-concerns","tdd","transaction-management","validation","vitest"],"created_at":"2024-11-19T18:48:41.383Z","updated_at":"2026-04-12T22:50:54.727Z","avatar_url":"https://github.com/codebatine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-Chain\n\nGo-Chain is a custom cryptocurrency blockchain implementation with transaction management and validation. This project includes the following features and components. :point_down:\n\n## Features\n\n### Blockchain Implementation :bricks:\n\n- A custom cryptocurrency blockchain.\n- Transaction management and validation.\n\n### Transaction Pool :water_polo:\n\n- Managed transactions before adding them to a block.\n- Created and tracked reward transactions in the transaction pool.\n\n### Validation :white_check_mark:\n\n- Validated transactions to ensure they follow specified rules.\n\n### Networking :magnet:\n\n- Supported multiple nodes with blockchain synchronization.\n- Utilized Redis for network communication.\n\n### Database :floppy_disk:\n\n- Stored the blockchain, blocks and transactions in a MongoDB database.\n\n### Security :closed_lock_with_key:\n\n- Implemented user registration and login.\n- Used JSON Web Tokens (JWT) for user validation.\n- Stored user information in MongoDB.\n\n### Client Application :balloon:\n\n- Developed a client application using React with Vite.\n- Enabled the creation of new transactions.\n- Listed transactions and blocks.\n- Provided functionality to mine blocks with transactions.\n\n### Best Practices :crystal_ball:\n\n- TDD for transaction management.\n- Followed best practices: Clean Code, Separation of Concerns (SOC) and Model-View-Controller (MVC).\n- Secured the server against various attacks, including NoSQL injections, DDOS and XSS attempts.\n\n## Installation :scroll:\n\nTo run this project locally, follow these steps:\n\n1. **Clone the repository:**\n\n   ```sh\n   git clone https://github.com/codebatine/gochain.git\n   cd gochain\n   ```\n\n2. **Install dependencies for both backend and frontend:**\n\n   ```sh\n   cd backend\n   npm i\n   cd ../frontend\n   npm i\n   ```\n\n3. **Run Redis server:**\n\n   ```sh\n   redis-server\n   ```\n\n4. **Set up MongoDB:**\n\n   Make sure you have MongoDB installed and running on your local machine.\n\n5. **Add environment variables:**\n\n   Create a file named `.env` in the `backend/config` directory with the following content:\n\n   ```env\n   NODE_ENV=development\n   PORT=5000\n   MONGO_URI=your_mongo_uri_here\n   JWT_SECRET=your_jwt_secret_here\n   JWT_TTL=90d\n   JWT_COOKIE_TTL=90d\n   REDIS_HOST=localhost\n   REDIS_PORT=6379\n   ```\n\n6. **Start the backend and frontend servers:**\n\n   Open two terminal windows or tabs and run the following commands in each:\n\n   **In the first terminal (backend):**\n\n   ```sh\n   cd backend\n   npm run dev\n   ```\n\n   **In the second terminal (frontend):**\n\n   ```sh\n   cd frontend\n   npm run dev\n   ```\n\n   7. **Run tests in backend:**\n\n   To run tests for the backend, use the following command:\n\n   ```sh\n   cd backend\n   npm test\n   ```\n\n## Usage :flamingo:\n\n1. **Register and log in:**\n\n   - Create a new user account and log in to access the blockchain features.\n\n2. **Create transactions:**\n\n   - Use the client application to create and send new transactions.\n\n3. **Mine blocks:**\n\n   - Mine blocks to add transactions to the blockchain and receive rewards.\n\n4. **View blockchain:**\n   - Explore the blockchain, view transactions and monitor blocks.\n\n## Screenshots :camera_flash:\n\nHere are some screenshots of the Go-Chain application in action:\n\n![Start](frontend/src/assets/screenshots/gochain-start.jpg)\n\n### Registration and Login\n\n![Signup](frontend/src/assets/screenshots/gochain-signup.jpg)\n\n### Creating a Transaction\n\n![Create Transaction](frontend/src/assets/screenshots/gochain-send.jpg)\n\n### Viewing the Blockchain\n\n![View Blockchain](frontend/src/assets/screenshots/gochain-blockexplorer.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebatine%2Fgochain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebatine%2Fgochain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebatine%2Fgochain/lists"}