forked from elizaOS/eliza
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from Okulon/feat/nillion-bounty-integration
Feat/nillion bounty integration
- Loading branch information
Showing
28 changed files
with
3,920 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Feature Flags | ||
NEXT_PUBLIC_ENABLE_NILLION=true | ||
|
||
# Nillion Configuration (using demo credentials) | ||
NEXT_PUBLIC_NILLION_SECRET_KEY=a786abe58f933e190d01d05b467838abb1e391007a674d8a3aef106e15a0bf5a | ||
NEXT_PUBLIC_NILLION_ORG_DID=did:nil:testnet:nillion1vn49zpzgpagey80lp4xzzefaz09kufr5e6zq8c | ||
|
||
# API Configuration | ||
NEXT_PUBLIC_API_URL=http://localhost:3001 | ||
NEXT_PUBLIC_NETWORK=sepolia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Feature Flags | ||
NEXT_PUBLIC_ENABLE_NILLION=true | ||
|
||
# API Configuration | ||
NEXT_PUBLIC_API_URL=http://localhost:3001 | ||
NEXT_PUBLIC_NETWORK=sepolia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# API Integration Plan and Base Infrastructure | ||
|
||
## Overview | ||
This PR sets up the foundation for integrating our frontend with the backend API. It includes comprehensive documentation and base infrastructure for API integration. | ||
|
||
## Changes | ||
- Added detailed API integration plan (`docs/API_INTEGRATION.md`) | ||
- Created base API client with error handling (`src/api/client.ts`) | ||
- Set up directory structure for API integration | ||
|
||
## API Integration Plan Highlights | ||
1. **Phased Approach** | ||
- Phase 1: API Contract Definition | ||
- Phase 2: Environment Setup | ||
- Phase 3: API Integration | ||
- Phase 4: Testing & Validation | ||
- Phase 5: Monitoring & Maintenance | ||
|
||
2. **Documentation** | ||
- Defined all required endpoints | ||
- Documented data schemas | ||
- Outlined integration testing strategy | ||
- Added environment configuration guide | ||
|
||
3. **Infrastructure** | ||
- Base API client with axios | ||
- Error handling with custom APIError class | ||
- Authentication interceptors | ||
- TypeScript types and interfaces | ||
|
||
## Next Steps | ||
- [ ] Review API contract with backend team | ||
- [ ] Set up staging environment | ||
- [ ] Begin endpoint implementation | ||
- [ ] Create integration test suite | ||
|
||
## Testing | ||
- Base API client is set up with proper error handling | ||
- Documentation has been reviewed for completeness | ||
- Directory structure follows best practices | ||
|
||
## Screenshots | ||
N/A - Infrastructure and documentation changes only | ||
|
||
## Additional Notes | ||
This PR serves as a foundation for our API integration. It will help the team understand what endpoints are needed and how to implement them consistently. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const nextJest = require('next/jest'); | ||
|
||
const createJestConfig = nextJest({ | ||
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
dir: './', | ||
}); | ||
|
||
// Add any custom config to be passed to Jest | ||
const customJestConfig = { | ||
testTimeout: 10000, | ||
testEnvironmentOptions: { | ||
customExportConditions: [''], | ||
}, | ||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], | ||
testEnvironment: 'jest-environment-jsdom', | ||
moduleNameMapper: { | ||
'^@/(.*)$': '<rootDir>/src/$1', | ||
}, | ||
}; | ||
|
||
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async | ||
module.exports = createJestConfig(customJestConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import '@testing-library/jest-dom'; | ||
|
||
// Mock next/navigation | ||
jest.mock('next/navigation', () => ({ | ||
useRouter: () => ({ | ||
push: jest.fn(), | ||
replace: jest.fn(), | ||
prefetch: jest.fn(), | ||
}), | ||
useParams: () => ({}), | ||
useSearchParams: () => ({ | ||
get: jest.fn(), | ||
}), | ||
})); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.