{"id":20267242,"url":"https://github.com/potlock/potlock-nextjs-app","last_synced_at":"2025-07-03T02:05:28.528Z","repository":{"id":239961128,"uuid":"800754968","full_name":"PotLock/potlock-nextjs-app","owner":"PotLock","description":"Potlock NextJS App","archived":false,"fork":false,"pushed_at":"2025-06-20T06:22:48.000Z","size":6522,"stargazers_count":6,"open_issues_count":129,"forks_count":8,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-20T07:32:26.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://potlock-next-app.vercel.app","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/PotLock.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-14T23:50:36.000Z","updated_at":"2025-06-19T04:11:28.000Z","dependencies_parsed_at":"2024-05-20T21:32:21.609Z","dependency_job_id":"5a0ab496-3430-44c4-9edc-6376b4a2b630","html_url":"https://github.com/PotLock/potlock-nextjs-app","commit_stats":null,"previous_names":["potlock/potlock-nextjs-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PotLock/potlock-nextjs-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fpotlock-nextjs-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fpotlock-nextjs-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fpotlock-nextjs-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fpotlock-nextjs-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PotLock","download_url":"https://codeload.github.com/PotLock/potlock-nextjs-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fpotlock-nextjs-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261965574,"owners_count":23237611,"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":[],"created_at":"2024-11-14T12:13:56.951Z","updated_at":"2025-07-03T02:05:28.499Z","avatar_url":"https://github.com/PotLock.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# POTLOCK Next\n\nPOTLOCK frontend application built on NextJS featuring project exploration, pages, donations, and Pots (quadratic funding for now) on the NEAR Blockchain\n\nThe backlog to the NextJS App can be found at \u003chttps://potlock.org/next-backlog\u003e\n\nYou can access BOS POTLOCK version using one of the environments below:\n\n- [Production](https://bos.potlock.org/)\n- [Staging](https://bos.potlock.org/staging.potlock.near/widget/IndexLoader)\n- [Repo](https://github.com/potlock/bos-alem-app)\n\nYou can see original features \u003chttps://potlock.notion.site/All-Features-Potlock-NextJS-App-5f543fa8b31840aa88bf5b8cf57ead3d?pvs=4\u003e\n\nCore contracts can be found at \u003chttps://github.com/PotLock/core\u003e\nContract documentation: \u003chttps://docs.potlock.io/contracts/contracts-overview\u003e\n\n## Getting Started\n\n### IDE setup\n\nFirst, make sure to install **every extension** from the \"recommended\" section of VSCode extension panel!\n\n### Environment setup\n\n```bash\n# using the right node version\nnvm use\n# enable Yarn support\ncorepack enable \u0026\u0026 corepack install\n# create config for environment variables\ncp .env.example .env.local\n# if required, edit .env.local\n# then run the development server ( dependencies will be installed automatically )\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser.\n\n## Backend ( Indexer API )\n\n### Test environment ( on testnet )\n\n**Swagger Docs**: \u003chttps://test-dev.potlock.io/api/schema/swagger-ui/#/\u003e\n\n**Endpoint URL**: \u003chttps://test-dev.potlock.io\u003e\n\n### Staging environment ( on mainnet )\n\n**Swagger docs**: \u003chttps://dev.potlock.io/api/schema/swagger-ui/#/\u003e\n\n**Endpoint URL**: \u003chttps://dev.potlock.io\u003e\n\n### Production environment ( on mainnet )\n\n**Swagger docs**: \u003chttps://api.potlock.io/api/schema/swagger-ui/#/\u003e\n\n**Endpoint URL**: \u003chttps://api.potlock.io\u003e\n\n## Dependencies\n\n### UnoCSS\n\nMore performant and flexible drop-in replacement for Tailwind CSS, created by [Anthony Fu](https://antfu.me)\n\n[Documentation](https://unocss.dev)\n\n### Nice Modal\n\nVersatile abstraction for modals\n\n[Documentation](https://github.com/eBay/nice-modal-react?tab=readme-ov-file#nice-modal)\n[Examples](https://opensource.ebay.com/nice-modal-react/)\n\n## Naming conventions\n\n- Anything explicitly marked as deprecated is subject to either complete replacement or refactoring as soon as there's opportunity\n\n## Project Structure\n\nThe architectural doctrine of the project is heavily based on [Feature-Sliced Design](https://feature-sliced.design/docs/reference/layers).\nThis provides explicit separation between abstract and business-logic-heavy parts of the codebase,\nfor which it offers a highly modular approach, defining clear boundaries for different\naspects of the application within each module:\n\n```sh\n\n[ src/ ]\n│\n├── global.d.ts \u003c--- # Globally available type definitions\n│\n│\n│\n├── [ common ] \u003c--- # Low-level foundation of the app, containing endpoint bindings,\n│   │               # utility libraries, reusable primitives, and assets, used in layouts and\n│   │               # business logic across the codebase. MUST NOT contain business logic by itself.\n│   │               # AKA \"shared\" ( see link 1. )\n│   │\n│   ├── constants.ts \u003c--- # Static reusable values, e.g.\n│   │                      export const NATIVE_TOKEN_ID = \"near\";\n│   │                      export const MAX_GAS = 100;\n│   │\n│   ├── [ api ] \u003c--- # Basic network and data layer\n│   │\n│   ├── [ assets ] \u003c--- # Globally used assets, e.g. images or icons\n│   │\n│   ├── [ contracts ] \u003c--- # Smart contract services and interfaces\n│   │\n│   ├── [ hooks ] \u003c--- # Shared React hooks for low-level functionalities\n│   │\n│   ├── [ lib ] \u003c--- # Universal utilities, e.g. string manipulations,\n│   │                # mathematic calculations, browser API bindings, etc.\n│   │\n│   └── [ ui ] \u003c--- # Project UI kit\n│       │\n│       ├── [ components ] \u003c--- # React components implementing UI design primitives\n│       │\n│       └── [ utils ] \u003c--- # UI-specific utilities, like DOM manipulations\n│                          # or TailwindCSS class transformers\n│\n│\n│\n├── [ entities ] \u003c--- # Business units organized into codebase slices ( See link 2. )\n│   │\n│  ...\n│   │\n│   │\n│   ├── [ pot ] \u003c--- # An entity-specific codebase slice\n│   │   │\n│   │   ├── index.ts \u003c--- # Entry point for public exports ( available for external use )\n│   │   │\n│   │   ├── constants.ts \u003c--- # Module-specific static reusable values, e.g.\n│   │   │                       export const POT_MIN_NAME_LENGTH = 3;\n│   │   │\n│   │   ├── model.ts \u003c--- # Entity state definitions ( See link 4. )\n│   │   │\n│   │   ├── types.ts \u003c--- # Entity-specific shared types and interfaces\n│   │   │\n│   │   ├── [ components ] \u003c--- # Entity-specific React components\n│   │   │\n│   │   ├── [ hooks ] \u003c--- # Entity-specific React hooks\n│   │   │\n│   │   └── [ utils ] \u003c--- # Entity-specific utilities, like value converters or validators\n│   │\n│   │\n│   ├── ...\n│   │\n│  ...\n│\n│\n│\n├── [ features ] \u003c--- # A collection of codebase slices implementing various use cases\n│   │                 # and are named after functionalities they provide. ( See link 3. )\n│   │\n│  ...\n│   │\n│   │\n│   ├── [ donation ] \u003c--- # A feature-specific module\n│   │   │\n│   │   ├── index.ts \u003c--- # Entry point for public exports ( available for external use )\n│   │   │\n│   │   ├── constants.ts \u003c--- # Module-specific static reusable values, e.g.\n│   │   │                       export const DONATION_MIN_NEAR_AMOUNT = 0.1;\n│   │   │\n│   │   ├── model.ts \u003c--- # Feature state definitions ( See link 4. )\n│   │   │\n│   │   ├── types.ts \u003c--- # Feature-specific shared types and interfaces\n│   │   │\n│   │   ├── [ components ] \u003c--- # Feature-specific React components\n│   │   │\n│   │   ├── [ hooks ] \u003c--- # Feature-specific React hooks\n│   │   │\n│   │   └── [ utils ] \u003c--- # Feature-specific utilities, like value converters or validators\n│   │\n│   │\n│   ├── ...\n│   │\n│  ...\n│\n│\n│\n├── [ layout ] \u003c--- # Since Next's Pages Router doesn't support non-routable page subdirectories\n│   │               # ( components / hooks ), layout composition is addressed in this layer.\n│   │               # It allows to keep complex page-related UI elements that combine\n│   │               # ( A pattern where each page's tab is treated by the router as a sub-page )\n│  ...              # more than one feature and/or entity without introducing cross-imports\n│   │               # within those codebase slices, which helps to avoid circular dependencies.\n│   │               # In addition to conditional redirects, it addresses the routable tab navigation \n│   │               # ( A pattern where each page's tab is treated by the router as a sub-page )\n│   │\n│   ├── [ pot ]\n│   │   │\n│   │   ├── [ components ] \u003c--- # ONLY components specific to the pages within the /pot namespace.\n│   │   │\n│   │   └── [ hooks ] \u003c--- # ONLY hooks specific to the pages within the /pot namespace.\n│   │\n│  ...\n│\n│\n│\n├── [ pages ] \u003c--- # Entry point of the application.\n│                  # Follows Nextjs Pages routing specification ( see link 5. )\n│\n│\n│   # TODO: Should be gradually refactored into separate Zustand stores and SWR hooks\n└── [ store ] \u003c--- # Shared application state root.\n                   # Uses Rematch state management library, based on Redux.\n\n```\n\n### Links\n\n1. [Shared layer from Feature-Sliced Design methodology](https://feature-sliced.design/docs/reference/layers#shared)\n2. [Entities layer specification](https://feature-sliced.design/docs/reference/layers#entities)\n3. [Features layer specification](https://feature-sliced.design/docs/reference/layers#features)\n4. [Rematch models](https://rematchjs.org/docs/api-reference/models)\n5. [Nextjs Routing](https://nextjs.org/docs/pages/building-your-application/routing)\n\n## Testing\n\nWe use Vitest testing framework coupled with React Testing Library to specifically target UI.\n\nFor details, please refer to the corresponding documentation resources:\n\n- [Vitest API reference](https://vitest.dev/api/)\n- [React Testing Library guideline](https://testing-library.com/docs/react-testing-library/example-intro)\n\nAll tests should be located in the `_tests/` directory. ... for each specific page or group of use cases.\n\n```bash\n\n[ _tests/ ]\n│\n├── donation.tests.tsx \u003c--- # Tests for donation scenarios\n│\n├── homepage.tests.tsx \u003c--- # Tests for the homepage\n│\n...\n│\n└── test-env.tsx \u003c--- # Testing environment setup\n\n```\n\n### Commands\n\nExecute all unit tests:\n\n```bash\nyarn test:unit\n```\n\nRun dev server for unit tests:\n\n```bash\nyarn dev:test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotlock%2Fpotlock-nextjs-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotlock%2Fpotlock-nextjs-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotlock%2Fpotlock-nextjs-app/lists"}