-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: remove outdated NOTES.md and enhance type annotation #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
17170997 | Triggered | Generic High Entropy Secret | 14de6d4 | frontend/openapi.json | View secret |
9724569 | Triggered | Generic Password | 4e29054 | helm-charts/quick-forge-ai/values.local.yaml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 92 files out of 280 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the WalkthroughThis update introduces a comprehensive, production-ready full-stack template built on Next.js and FastAPI, with a strong focus on modularity, scalability, and developer experience. It adds a complete Helm chart system for Kubernetes deployment, a new admin frontend, and a documentation website. The frontend is migrated to Next.js, integrating OpenAPI-driven client generation, robust authentication flows, and full test coverage. The backend gains token blacklisting, improved error handling, and enhanced security. Extensive documentation and configuration files are included for local and production deployments. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend (Next.js)
participant Backend (FastAPI)
participant DB (PostgreSQL)
participant Admin UI
participant Helm/K8s
User->>Frontend (Next.js): Visit /login, /register, /dashboard
Frontend (Next.js)->>Backend (FastAPI): API call (login/register/items)
Backend (FastAPI)->>DB (PostgreSQL): Query/Update (auth, items)
Backend (FastAPI)-->>Frontend (Next.js): API response (token/data)
Frontend (Next.js)-->>User: Render page or redirect
User->>Frontend (Next.js): Click "Logout"
Frontend (Next.js)->>Backend (FastAPI): POST /logout (with token)
Backend (FastAPI)->>DB (PostgreSQL): Add token to blacklist
Backend (FastAPI)-->>Frontend (Next.js): Success message
Frontend (Next.js)-->>User: Redirect to login
Admin UI->>Backend (FastAPI): OpenAPI client codegen via script
Helm/K8s->>All Services: Deploy via helm install/upgrade
User->>Website: Access docs, blog, and guides
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
PR Review 🔍
|
PR Code Suggestions ✨
|
…sponse handling - Deleted the obsolete NOTES.md file that contained outdated guidance for IDE agents. - Updated type annotations in response.py to improve clarity and type safety. - Enhanced the get_api_response_data function in conftest.py to support new API response formats. - Refined error handling in error.py to ensure consistent API error responses with updated type hints. - Improved type definitions in utils/__init__.py for better code maintainability.
…tion - Added LITELLM_MASTER_KEY to .env.example for LiteLLM configuration. - Included OpenRouter settings in .env.example for API integration. - Updated README.md to include a badge for CodeRabbit Pull Request Reviews.
- Added TokenBlacklist model to store invalidated tokens. - Implemented add_token_to_blacklist, is_token_blacklisted, and clean_expired_tokens functions in crud.py. - Updated logout endpoint to invalidate tokens by adding them to the blacklist. - Enhanced frontend logout logic to call the new logout API and handle token removal.
- Removed deprecated skip marker from the reset password test. - Updated token generation in the reset password test to align with actual implementation. - Simplified response validation and error handling in the reset password test. - Added missing type definitions and utility functions in the frontend client for better API response management. - Improved type safety and clarity in the ItemsTable component by refining data handling and translations.
…ation - Created foundational files for the website, including README.md, Dockerfile, and configuration files. - Added various components and hooks to support the website's functionality, such as theme toggles and locale management. - Implemented initial documentation structure in both English and Chinese, covering essential topics and best practices. - Included example cases and best practices for using Nexus, enhancing the overall documentation experience.
- Deleted obsolete frontend files including various components, configurations, and tests to streamline the project structure. - Updated documentation in both English and Chinese to reflect changes and improve clarity on project usage and features. - Enhanced the README and other documentation files to provide better guidance for users and developers. - Adjusted environment configuration examples to align with the current project setup.
- Restructured the Makefile to enhance readability and organization, grouping related commands and settings. - Added new targets for linting, testing, formatting, and cleaning across components. - Introduced commands for managing Docker images and deploying to Docker Swarm. - Updated help command to provide clearer usage instructions for all available targets.
- Introduced new targets for the admin panel, including build, install, lint, test, and format commands. - Updated the all, lint, test, and format targets to include admin components for comprehensive management. - Enhanced help command to provide usage instructions for new admin commands. - Improved overall organization of the Makefile for better clarity and functionality.
…thentication - Introduced new frontend configuration files including package.json, package-lock.json, pnpm-lock.yaml, tsconfig.json, and tailwind.config.js to establish a robust project structure. - Updated middleware to utilize the new OpenAPI client for user authentication, improving error handling and response validation. - Enhanced dashboard and login pages with Suspense for better loading states and user experience. - Refactored item addition and password recovery forms to include improved state management and error handling. - Added new components and UI elements to support the overall functionality and design of the application.
…ommands - Replaced npm with pnpm for package management across frontend, admin, and website targets. - Added checks for the installation of pnpm and uv, with automatic installation if not present. - Enhanced commands to include warnings for missing frontend directory or package.json. - Introduced new admin-preview target for previewing production builds of the admin panel.
- Added Index route to the route tree for better navigation. - Updated Card component to use fixed colors instead of relying on color mode. - Refactored authentication hooks to streamline login endpoint handling. - Improved layout and structure of index, login, and password recovery pages for better usability. - Updated Tailwind CSS configuration for enhanced theming and design consistency. - Refined TypeScript configuration for stricter type checking and improved module resolution. - Removed unnecessary Suspense components from login and password recovery pages for cleaner code.
- Enhanced the 'all' target in the Makefile to include format, lint, and test commands for comprehensive checks before building components. - Refactored imports in backend files to improve code clarity and organization. - Removed unnecessary blank lines in various backend files to streamline the codebase. - Updated frontend login, password recovery, and registration pages to utilize Suspense for handling search parameters, improving user experience.
- Updated project structure by renaming 'admin' to 'frontend' across various files for clarity. - Removed the VITE_ADMIN_API_URL environment variable and adjusted API handling in the code. - Simplified Navbar, Sidebar, and UserMenu components by eliminating unnecessary props and logic. - Enhanced README documentation to reflect the new frontend structure and usage instructions. - Removed deprecated index route and card component to clean up the codebase.
- Replaced the .env.example file with new environment variables for the SurfSense extension. - Updated .gitignore to streamline ignored files and added new entries for build artifacts. - Removed obsolete scripts and files related to icon generation and extension setup. - Refactored package.json and pnpm-lock.yaml to reflect updated dependencies and project structure. - Cleaned up TypeScript configuration for better compatibility with the Plasmo framework. - Deleted unused components and utility files to simplify the codebase.
…Extension - Renamed the extension from SurfSense to Nexus Browser Extension and updated its version to 0.1.0. - Revised the description to reflect new AI-powered features for reading assistance. - Enhanced README with an overview, key features, use cases, and installation instructions. - Added a new build script for improved development workflow. - Updated permissions in the manifest to include context menus for better functionality. - Replaced the extension icon with a new design.
- Changed all references from "SurfSense" to "Nexus" in configuration, documentation, and UI components. - Updated routing to replace ApiKeyForm with LoginForm and added RegisterForm for improved user authentication flow. - Modified environment variables in .env.example to reflect the new branding. - Enhanced user experience by updating loading and home page components to display the new branding consistently.
- Added pnpm setup in the GitHub Actions workflow for client generation. - Changed Node.js caching from npm to pnpm for better performance. - Updated dependency installation command from npm to pnpm in the frontend directory. - Enhanced error handling in various components to accommodate new API response formats. - Cleaned up code by removing unnecessary blank lines and improving readability in several files.
- Updated the dashboard layout to include a system overview and project deployment resources. - Introduced new environment variables for domain, project name, and environment in docker-compose. - Added Chakra UI icons and improved the user interface with additional components for better navigation and information display. - Updated package dependencies to include @chakra-ui/icons for enhanced UI capabilities.
- Implemented a direct API call for password updates in the ChangePassword component, with fallback to the existing service method on failure. - Added error handling and user feedback for password update failures. - Updated the logout function to ensure the authorization token is included in the API request. - Enhanced the dashboard layout to dynamically generate deployment URLs based on environment variables, improving clarity and usability.
…gement - Added pnpm caching to the workflow for improved performance. - Installed pnpm globally in the workflow. - Replaced npm install commands with pnpm install for the frontend directory, ensuring a consistent package management approach.
- Added pnpm installation to the GitHub Actions workflow for improved dependency management. - Updated the OpenAPI specification to reflect new API endpoints and response structures, enhancing the documentation for better clarity. - Refactored client SDK generation to align with updated API types and improve type safety across the application.
- Changed the path for formatting generated client code from './src/client' to './app/openapi-client' to align with the new project structure.
- Added new Makefile targets for generating OpenAPI clients for both the admin panel and all clients. - Refactored the admin client generation script to check for an existing OpenAPI JSON file before attempting to download it, improving efficiency. - Updated the client generation process to use pnpm for better dependency management and added formatting steps for generated code.
- Updated Makefile to include separate targets for generating frontend and admin OpenAPI clients. - Improved echo messages for clarity during client generation. - Maintained backward compatibility by adjusting the generate-all-clients target.
…nd clarity - Modified Makefile to streamline build targets for backend, frontend, and admin components, introducing new build and restart commands. - Refactored client service imports to enhance clarity and maintainability by renaming imported functions for better context. - Updated item action types to improve type safety and align with the new OpenAPI client structure.
…mponents - Changed the testing framework from Vitest to Playwright for better UI testing capabilities. - Updated Makefile to reflect the temporary skipping of admin tests due to network issues, with instructions for manual testing. - Enhanced error handling in the ChangePassword component to utilize the new error message structure. - Refactored imports in various components for improved clarity and organization. - Added new dependencies for Playwright and Vitest to package management files.
…ssue management - Introduced a new general rules file to standardize terminal operations, emphasizing the use of 'uv' for Python and 'pnpm' for Node.js. - Added proxy environment variable settings for installation commands. - Updated GitHub operation rules to specify language preferences for issue raising and tone guidelines for communication.
- Replaced Adminer references with pgAdmin across documentation and configuration files for consistency. - Updated environment variables in `.env.example` to include Google OAuth settings for improved authentication. - Adjusted deployment and development documentation to reflect the change from Adminer to pgAdmin. - Enhanced error handling in user authentication processes to accommodate OAuth users without passwords.
User description
This pull request introduces several updates to configuration files, environment variables, documentation, and a new admin frontend setup. The changes focus on improving development workflows, updating URLs for consistency, and adding a new admin interface with its supporting files.
Environment and Configuration Updates:
FRONTEND_HOST
andBACKEND_CORS_ORIGINS
in.env.example
to usehttp://localhost:8000
for consistency across local development environments.ADMIN_CONTAINER_PORT
and OpenRouter API configuration (OR_SITE_URL
,OR_APP_NAME
,OR_API_KEY
). [1] [2]DOCKER_IMAGE_ADMIN
andLITELLM_MASTER_KEY
variables in.env.example
for admin Docker setup and LiteLLM configuration.Documentation and Readme Updates:
README.md
andREADME_zh-CN.md
to reflect the newhttp://localhost:8000
base URL. [1] [2] [3]NOTES.md
, cleaning up legacy instructions.Admin Frontend Setup:
admin
directory with configuration files, including.env.example
,.gitignore
, andDockerfile
, to set up an admin frontend application. [1] [2] [3]admin/package.json
with dependencies for React, Chakra UI, and TypeScript, along with scripts for development, testing, and client generation.admin/openapi-ts.config.ts
for generating API client code based on OpenAPI specifications.Miscellaneous:
README.md
..cursor/rules/github-operation.mdc
for GitHub operations.Description
This pull request introduces significant enhancements and documentation updates to the nexus project:
Makefile
to improve the build process and add new commands for admin and website builds.Changes walkthrough 📝
Makefile
Refactor Makefile for Improved Build Process
Makefile
openapi.json
Add OpenAPI Specification for FastAPI
frontend/openapi.json
routes-and-navigation.mdx
Document FastAPI Routing and Navigation
website/src/content/zh/docs/backend/routes-and-navigation.mdx
application.
extension-guide.mdx
Add Extension Guide for Nexus Project
website/src/content/en/docs/best-practices/extension-guide.mdx
project.
project-structure.mdx
Document Project Structure of Nexus
website/src/content/en/docs/getting-started/project-structure.mdx
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes
Documentation
Chores
Tests