Skip to content

Navigating Repo

r-kohale9 edited this page Dec 18, 2019 · 2 revisions

How to Navigate the repository

First, read the project structure docs from the repo wiki.

All the modules are stored in the modules folder in the root folder. Each module consists of folders client-react, client-react-native, common and server-ts. As the name suggest the corresponding code can be found in the respective folders.

Client-react

This folder consists -

  • File index.jsx
    • This is where all the routes corresponding to the module can be found.
  • File index.native.jsx
    • The is where the routes for the native app are declared.
  • Folder containers
    • The routes declared in index.jsx file points to some file, those files are stored in containers, this file contains part of the component where it communicates with the server.
  • Folder components
    • The files that are present in containers point to the files present in this file, these file contain the styling and layout part of the component.
  • Folder graphql
    • This is the folder that contains all the .graphql files which store the corresponding structure required for a api request.
  • Folder locals
    • This folder contains the translation.jsx file in the corresponding folder of their classified language, this translation.jsx file is used for loading the data on the webpages using the translate function.

Server-ts

This folder consists -

  • Folder migration
    • This folder consists the knex migration file
  • Folder seeds
    • This folde contains the seed data
  • File sql.js
    • Used in api
  • File server.js
    • Used in api

General things -

While working with the repo keep the following things in mind ->

  • Whenever you have to import a file/function/component from other component follow the folling format Don't->

    // Import from another module
    import { PageLayout } from "../../../look/client-react/ui-antd/components/PageLayout";

    Do ->

    import { PageLayout } from "@gqlapp/look-client-react";
Clone this wiki locally