Skip to main content

routes.json and Related Concepts Documentation

Welcome to the comprehensive documentation for routes.json and related concepts in our application architecture. This documentation covers various aspects of routing, data loading, styling, and best practices for building robust and efficient applications.

Table of Contents

  1. routes.json Overview

    • Purpose of routes.json
    • Basic structure
    • Key benefits
  2. Field Descriptions

    • Common fields
    • Authentication and authorization fields
    • Component and data loading fields
    • GraphQL and data fetching fields
    • Additional configuration fields
  3. Authentication and Authorization

    • Configuring authentication
    • Setting up authorization
    • Using authority and extraPermissions
    • Automatic wrapper application
  4. Loaders and Data Fetching

    • Server-side loaders
    • Client-side loaders
    • Actions for form submissions and mutations
    • Integrating loaders with authentication and authorization
  5. GraphQL Integration

    • Defining GraphQL queries in routes.json
    • Passing parameters to queries
    • Handling query results in components
  6. Advanced Configurations

    • Custom wrappers
    • Resource URIs
    • Additional configuration options
    • Handling dynamic routes
  7. Best Practices and Tips

    • Organizing routes.json
    • Naming conventions
    • Security considerations
    • Performance optimization
    • Troubleshooting common issues
  8. CSS Import and Stylesheet Links

    • Importing CSS files from packages
    • Using CSS modules
    • Returning stylesheet links in TypeScript
    • Troubleshooting CSS-related issues
  9. Query Params Generator and Loaders

    • Implementing queryParamsGenerator
    • Custom query loaders
    • Handling nested variables in queries
  10. Generated Data Loaders

    • Automatic generation of Remix data loaders
    • Parsing components for GraphQL queries
    • Server and client loader generation
  11. Component Structure Best Practices

    • Proper placement of network requests
    • Separating data fetching from presentation
    • Using loaders in main components
    • Creating pure subcomponents

Quick Start

To get started quickly with our application architecture, follow these steps:

  1. Read the routes.json Overview to understand the purpose and structure of routes.json.
  2. Familiarize yourself with the available fields in routes.json.
  3. Learn how to set up authentication and authorization for your routes.
  4. Explore loaders and data fetching to understand how to load data for your components.
  5. If you're using GraphQL, check out the GraphQL integration section.
  6. Review the CSS Import and Stylesheet Links guide for styling your components.
  7. Understand how to use Query Params Generator and Loaders for efficient data fetching.
  8. Learn about Generated Data Loaders to optimize your data loading strategy.
  9. Follow the Component Structure Best Practices to build maintainable and efficient components.

Contributing to This Documentation

If you find any errors or have suggestions for improving this documentation, please contact the development team or follow the contribution guidelines in the project repository.

Happy coding!