An open API service indexing awesome lists of open source software.

https://github.com/hdm-chat-team/application-project-ws24


https://github.com/hdm-chat-team/application-project-ws24

bun react shadcn-ui tailwindcss tanstack-react-query tanstack-router turborepo vite websocket-chat

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# StudyConnect

[![Tests](https://github.com/DenizGazitepe/application-project-ws24/actions/workflows/test.yml/badge.svg)](https://github.com/DenizGazitepe/application-project-ws24/actions/workflows/test.yml) [![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat&logo=biome)](https://biomejs.dev)

A realtime web messanger to connect students at [Stuttgart Media University](https://www.hdm-stuttgart.de/)

## ๐Ÿ—’๏ธ Requirements

This project uses [Bun](https://bun.sh) as its package manager and server runtime.
To install it follow the instructions [here](https://bun.sh/docs/installation).

You will also need [Node.js](https://nodejs.org/en/download).

[Docker Desktop](https://www.docker.com/) to run the development database.

## ๐Ÿ—๏ธ Project structure

We are using [Bun workspaces](https://bun.sh/docs/install/workspaces) to separate packages.
Each package is 100% [TypeScript](https://www.typescriptlang.org/).

### ๐ŸŒ Apps

- `/app`: a monorepo-style app
- `/backend`: a ๐Ÿ”ฅ [Hono](https://hono.dev) server providing api and static routes
- ๐Ÿ” Cookie based authentication using the [lucia-auth](https://lucia-auth.com/) guide.
- ๐Ÿ”Œ [Websockets](https://bun.sh/docs/api/websockets) for real time features.
- `/frontend`: a โšก [Vite](https://vite.dev) SPA using
- โš›๏ธ [React](https://react.dev) as the frontend framework.
- ๐Ÿ๏ธ [Tanstack Router](https://tanstack.com/router/) for managing SPA routes.
- ๐Ÿ๏ธ [Tanstack react-query](https://tanstack.com/query) for managing server state on the client
- ๐Ÿ๏ธ [Tanstack react-form](https://tanstack.com/form) for form validation

### ๐Ÿ“ฆ Packages

- `/cuid`: package for generating and validating [CUID2](https://github.com/paralleldrive/cuid2) ids on the server and client.
- `/tsconfig`: shared typescript configuration

## ๐Ÿงฐ Utilities

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [Biome](https://biomejs.dev/) for code linting/formatting
- use `bun check` to check for typescript errors
- use `bun check:fix` to fix most linting errors and apply formatting
- [PWA-assets generator](https://vite-pwa-org.netlify.app/assets-generator)
- use `bun assets` to generate PWA assets from `public/logo.svg`

## ๐Ÿ’ก Contributing

We use [conventional commits](https://www.conventionalcommits.org) to format commit messages. The repo includes a recommended VSCode extension.
We use issue branches and Pull requests to organize changes.

## โŒจ๏ธ Commands

### ๐Ÿงช Test

So far we are simply using Bun's integrated test runner:

```zsh
bun run test
```

Make sure to include `run`, otherwise environment variables won't be set.

Test files are all named `*.test.ts`

### ๐Ÿ‘ทโ€โ™‚๏ธ Build

To build all apps and packages, run the following command in the root of the project:

```zsh
bun run build
```

### ๐Ÿ‹ Docker

To start the local database run:

```zsh
docker compose up db --detach
```

To start both containers:

```zsh
docker compose up --build --detach
```

### ๐Ÿ‘จโ€๐Ÿ’ป Develop

To start all development servers, run the following command:

```zsh
bun dev
```

Tanstack router and react-query will render development tools to debug their features.

To use Drizzle-kit CLI [commands](https://orm.drizzle.team/docs/kit-overview) run:

```zsh
bun db
```

To use shadcn/ui CLI [commands](https://ui.shadcn.com/docs/cli) run:

```zsh
bun ui
```