Skip to content

Commit

Permalink
chore: add readme docs to all packages and apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Sep 13, 2024
1 parent f2c6db0 commit b578a85
Show file tree
Hide file tree
Showing 13 changed files with 166 additions and 15 deletions.
72 changes: 58 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,42 @@ or packages.

This repository contains the following apps and packages:

- `staking`: Session Staking [Next.js](https://nextjs.org/) app.
- `@session/ui`: Session UI component library.
- `@session/eslint-config`: `eslint` configurations.
- `@session/typescript-config`: `tsconfig.json` configurations.
- `@session/contracts`: Session smart contract js library for interacting with the Session smart contracts.
- `@session/sent-staking-js`: Session Token Staking js library for interacting with the Session Token staking backend.
- `@session/wallet`: A wallet library for interacting with the Session Token.
- `@session/util`: A utility library for common functions.
- `@session/testing`: A testing library.
### Apps

- `staking`: Session Staking [Next.js](https://nextjs.org/) app. [Read more](apps/staking/README.md).

### Packages

- `@session/auth`: Auth package for handling third-party authentication
using [NextAuth.js](https://next-auth.js.org/). [Read more](packages/auth/README.md).
- `@session/contracts`: Session smart contract js library for interacting with the Session smart
contracts. [Read more](packages/contracts/README.md).
- `@session/eslint-config`: `eslint`
configurations. [Read more](packages/eslint-config/README.md). [Read more](packages/eslint-config/README.md).
- `@session/feture-flags`: Feature flags library for [Next.js](https://nextjs.org/) apps. Supporting client, server, and
remote flags. [Read more](packages/feature-flags/README.md).
- `@session/logger`: An opinionated logging wrapper. [Read more](packages/logger/README.md).
- `@session/sent-staking-js`: Session Token Staking js library for interacting with the Session Token staking
backend. [Read more](packages/sent-staking-js/README.md).
- `@session/testing`: A testing utility library. [Read more](packages/testing/README.md).
- `@session/typescript-config`: `tsconfig.json` configurations. [Read more](packages/typescript-config/README.md).
- `@session/ui`: Session UI component library is a collection of UI components for [Next.js](https://nextjs.org/) apps
and uses
[Tailwind CSS](https://tailwindcss.com/), [Radix UI](https://www.radix-ui.com/),
and [shadcn-ui](https://ui.shadcn.com/). [Read more](packages/ui/README.md).
- `@session/util`: A utility library for common functions. [Read more](packages/util/README.md).
- `@session/wallet`: A wallet library for interacting with the Session Token. [Read more](packages/wallet/README.md).

### Utilities

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
- [Tailwind CSS](https://tailwindcss.com/) for styling
- [TypeScript](https://www.typescriptlang.org/) for static type checking.
- [ESLint](https://eslint.org/) for code linting.
- [Prettier](https://prettier.io) for code formatting.
- [Tailwind CSS](https://tailwindcss.com/) for styling.
- [Next.js](https://nextjs.org/) for server-side rendering.
- [shadcn-ui](https://ui.shadcn.com/) for UI components.
- [Radix UI](https://www.radix-ui.com/) for UI components.
- [Jest](https://jestjs.io/) for unit testing.

### Build

Expand Down Expand Up @@ -62,6 +82,11 @@ pnpm install

This will install all the dependencies for all the apps and packages.

## Contributing

We welcome contributions to the Session Web Ecosystem. Please read our [contributing guidelines](CONTRIBUTING.md) for
more information on how to contribute.

## Development

You can find a `README.md` file in each app and package directory that explains how to develop and test that specific
Expand All @@ -75,7 +100,26 @@ tools. We
have disabled all telemetry, you can ensure developer telemetry is disabled in all packages by running
`pnpm check-telemetry`. We have disabled telemetry by aliasing the `turbo` command in the repository root with
`NEXT_TELEMETRY_DISABLED=1 DO_NOT_TRACK=1`.

- `NEXT_TELEMETRY_DISABLED=1` disables developer telemetry in nextjs.
- `DO_NOT_TRACK` disables telemetry in all packages that respect
the [Console Do Not Track (DNT) standard](https://consoledonottrack.com/)
the [Console Do Not Track (DNT) standard](https://consoledonottrack.com/)

## Testing

Our testing suite is a work in progress and any contributions are welcome.

### Jest

We use [Jest](https://jestjs.io/) for unit testing. You can run the tests with the following command:

```sh
pnpm test
```

### BrowserStack

This project is tested with BrowserStack.

[BrowserStack](https://browserstack.com/) is used for cross-browser, accessibility, and regression testing.

8 changes: 8 additions & 0 deletions packages/auth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @session/auth

This package is a collection of utilities for handling third-party authentication
using [NextAuth.js](https://next-auth.js.org/)

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.
24 changes: 24 additions & 0 deletions packages/contracts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# @session/contracts

This package is a Session smart contract js library for interacting with the Session smart
contracts. The smart contracts can be found in the [
eth-sn-contracts](https://github.com/oxen-io/eth-sn-contracts/) repository.

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.

## Development

The smart contracts can be found in the [eth-sn-contracts](https://github.com/oxen-io/eth-sn-contracts/) repository.
Their ABIs can be found in the `abi` directory.

### Updating the ABIs

To update the ABIs, run the following command:

```shell
pnpm generate
```

This will update the ABIs in the `abi` directory.
3 changes: 3 additions & 0 deletions packages/eslint-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @session/eslint-config

This package is a collection of `eslint` configurations for the Session Web Ecosystem.
8 changes: 8 additions & 0 deletions packages/feature-flags/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @session/feature-flags

This package is a feature flags library for [Next.js](https://nextjs.org/) apps. Supporting client, server, and
remote flags.

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.
8 changes: 8 additions & 0 deletions packages/logger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @session/logger

This package is an opinionated logging wrapper. It provides a consistent logging interface for the Session Web
Ecosystem.

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.
9 changes: 9 additions & 0 deletions packages/sent-staking-js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @session/sent-staking-js

This package is a js library for interacting with the Session Token staking
backend. The backend can be found in
the [Session Token Staking Backend](https://github.com/oxen-io/sent-staking-backend/) repository.

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.
7 changes: 7 additions & 0 deletions packages/testing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @session/testing

This package is a testing utility library. It provides a type interface for consistent data test ids.

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.
4 changes: 4 additions & 0 deletions packages/typescript-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @session/typescript-config

This package is a collection of `tsconfig.json` configurations for the Session Web Ecosystem.

23 changes: 23 additions & 0 deletions packages/ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# @session/ui

This package contains the shared UI components for the Session Web Ecosystem. The UI component library is a collection
of UI components for [Next.js](https://nextjs.org/) apps
and uses
[Tailwind CSS](https://tailwindcss.com/), [Radix UI](https://www.radix-ui.com/),
and [Shadcn/ui](https://ui.shadcn.com/).

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.

## Development

We generate all base UI components using [Shadcn/ui](https://ui.shadcn.com/).

### Adding a new base UI component

You can use the following command to add a new [Shadcn/ui](https://ui.shadcn.com/) component:

```shell
pnpm ui:add <COMPONENT_NAME>
```
1 change: 0 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"check-types": "tsc --noEmit",
"lint": "eslint .",
"lint-staged": "lint-staged",
"component:generate": "turbo gen react-component",
"ui:add": "npx shadcn-ui@latest add"
},
"devDependencies": {
Expand Down
7 changes: 7 additions & 0 deletions packages/util/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @session/util

This package is a utility library for common functions.

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.
7 changes: 7 additions & 0 deletions packages/wallet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @session/wallet

This package is a wallet library for interacting with the Session Token.

## Getting Started

You can follow the generic instructions in the root [README.md](../../README.md#getting-started) to get started.

0 comments on commit b578a85

Please sign in to comment.