Skip to content

Spawning-Inc/source-plus-frontend

Repository files navigation

Source Plus

Overview

Source.Plus (source.plus) is a platform to curate and license AI training datasets. Built using React, Next.js, and TypeScript and is designed for performance, and robust search capabilities. It leverages a mix of server-side rendering (SSR), static site generation (SSG), and client-side interactions to deliver a seamless user experience.

Architecture

The application is built with a Next.js foundation, supporting both Edge and Node.js environments. It follows a modular architecture with state management handled through Redux Toolkit and persistent storage managed by Redux Persist. Built to support an Elastic search backend using the Elastic React Search UI library.

Key functionalities include:

  • State Management: Redux Toolkit for global state management.
  • Authentication: Amazon Cognito for user authentication and session management.
  • Search Engine Integration: ElasticSearch via @elastic/react-search-ui and elastic-builder for querying.
  • UI Framework: A mix of MUI (Material-UI) components and custom madde design components for a consistent and accessible component library, .
  • Form Handling: react-hook-form for streamlined form validation and submission.
  • Performance Monitoring: Sentry for error tracking and application monitoring.
  • Analytics: Mixpanel for user behavior tracking and analytics.
  • Testing: Jest and Testing Library for unit and integration testing.

Key Dependencies

Frontend Framework and State Management

  • next: Core React-based framework supporting SSR, SSG, and API routes.
  • react, react-dom: Core React dependencies.
  • @reduxjs/toolkit, react-redux: Efficient global state management.
  • redux-persist: Persisted state across sessions.

Authentication and Security

  • amazon-cognito-identity-js: Amazon Cognito for secure authentication.
  • jwt-decode: Token parsing and decoding for authentication flows.

Search and Data Handling

  • @elastic/react-search-ui, @elastic/search-ui, elastic-builder: Integration with ElasticSearch for advanced search functionalities.
  • axios: HTTP client for API requests.
  • localforage: Client-side storage handling for offline capabilities.

UI/UX

  • @mui/material, @mui/icons-material: Material-UI for a modern component library.
  • @dnd-kit/core: Drag-and-drop functionality.
  • interweave: Rich text parsing and rendering.

Testing and Development Tools

  • jest, @testing-library/react, @testing-library/user-event: Unit and integration testing.
  • eslint, typescript, husky: Code quality and linting.
  • cross-env: Environment variable handling for different environments.

Scripts

The package.json includes various scripts for development, building, and testing:

  • dev: Runs the application in development mode.
  • build: Builds the application for production.
  • build:local: Builds using a Node.js environment.
  • test: Runs Jest test cases.
  • lint: Runs ESLint for static code analysis.
  • postinstall: Installs Husky for Git hooks.

Deployment

Source Plus supports both Cloudflare Pages (via @cloudflare/next-on-pages) and traditional server-based deployments using Next.js's built-in features. It dynamically switches between Edge and Node.js environments for optimized performance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published