GithubHelp home page GithubHelp logo

gazai's Introduction

Gazai

Local development

Run local development server

pnpm install
pnpm dev

Create and update data model

We are using prisma as our ORM and zod for schema validation. See prisma/schema.prisma for all the defined models. After updating the file, run:

pnpm prisma generate --no-engine

The above will update prisma client and generate new zod util schema using zod-prisma-types. And then run:

pnpm db:push

The above will push the new schema to postgres database. At this point we aren't doing any database migration. We will get to that when our product come to the point of a more stable state.

Localization

There are server-side and client-side localization applied in this application. For server-side component, you would import the useTranslation method from @/app/i18n and get the translation helper method:

const { t } = await useTranslation(lang)

Dictionary file lives under app/i18n/locales/[lang]/translation.json for server-side localization.

For client-side component you import the useTranslation method from react-i18next instead and get the translation helper method:

const { t } = useTranslation()

Not client-side component you don't need to provide lang from pathname and use it as client side hook without the async await.

Dictionary file lives under app/i18n/resources/[lang].ts for client-side localization.

gazai's People

Contributors

jtsaich avatar

Watchers

 avatar Beck Chen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.