Coder Social home page Coder Social logo

pubkey-link's Introduction

PubKey Link

Getting Started

Prerequisites

  • Node v18 or higher
  • PNPM
  • Docker

Installation

Clone the repo and install dependencies:

git clone [email protected]:pubkeyapp/pubkey-link.git
cd pubkey-link
pnpm

Automatic setup

You can run the automatic setup script to create the .env file, test the setup and push the database schema.

pnpm setup

Environment variables

Copy the .env.example file to .env and fill in the missing values.

cp .env.example .env

Starting the services

You will need to start the database before starting the backend.

pnpm dev:services

Pushing the database schema

If you start from scratch, you will need to push the database schema to the database.

pnpm prisma db push

Also, after each change to the schema in prisma/schema.prisma, you will need to run the above command again.

Starting the API

pnpm dev:api

Starting the web ui

pnpm dev:web

Starting the SDK generator

pnpm dev:sdk

Extending the application

You can use the following commands to generate new models, API features, web features and SDK types.

Adding a new model

The following command will generate a new model in prisma/schema.prisma.

You will need to run pnpm prisma db push to push the schema to the database.

pnpm nx g prisma-model company

Output:

> NX Generating @pubkey-link/tools:prisma-model

UPDATE prisma/schema.prisma

Adding a new API feature

The following command will generate a new API feature in libs/api/company/*.

You will need to restart the API server to make sure it picks up the new libraries.

pnpm nx g api-feature company

Output:

> NX Generating @pubkey-link/tools:api-feature

CREATE libs/api/company/data-access/...
CREATE libs/api/company/feature/...
UPDATE libs/api/core/feature/src/lib/api-core-feature.module.ts
CREATE libs/sdk/src/graphql/feature-company.graphql
CREATE apps/api-e2e/src/api/api-company-feature.spec.ts

Adding a new web feature

The following command will generate a new web feature in libs/web/company/*.

You will need to restart the web server to make sure it picks up the new libraries.

pnpm nx g web-feature company

Output:

> NX Generating @pubkey-link/tools:web-feature

CREATE libs/web/company/data-access/...
CREATE libs/web/company/feature/...
CREATE libs/web/company/ui/...
UPDATE libs/web/shell/feature/src/lib/shell-admin-routes.tsx
UPDATE tsconfig.base.json

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.