This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 52afaca
Showing
131 changed files
with
20,956 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Since .env is gitignored, you can use .env.example to build a new `.env` file when you clone the repo. | ||
# Keep this file up-to-date when you add new variables to \`.env\`. | ||
|
||
# This file will be committed to version control, so make sure not to have any secrets in it. | ||
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets. | ||
|
||
# The database URL is used to connect to your Supabase database. | ||
POSTGRES_URL="postgres://postgres.[USERNAME]:[PASSWORD]@aws-0-ap-south-1.pooler.supabase.com:6543/postgres?workaround=supabase-pooler.vercel" | ||
|
||
|
||
# You can generate the secret via 'openssl rand -base64 32' on Unix | ||
# @see https://next-auth.js.org/configuration/options#secret | ||
AUTH_SECRET='supersecret' | ||
|
||
# Github OAuth provider | ||
# @see https://next-auth.js.org/providers/github | ||
AUTH_GITHUB_ID='' | ||
AUTH_GITHUB_SECRET='' | ||
|
||
# In case you're using the Auth Proxy (apps/auth-proxy) | ||
# AUTH_REDIRECT_PROXY_URL='https://auth.your-server.com/r' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thank you for taking the time to file a feature request. Please fill out this form as completely as possible. | ||
- type: textarea | ||
attributes: | ||
label: Describe the feature you'd like to request | ||
description: Please describe the feature as clear and concise as possible. Remember to add context as to why you believe this feature is needed. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the solution you'd like to see | ||
description: Please describe the solution you would like to see. Adding example usage is a good way to provide context. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Additional information | ||
description: Add any other information related to the feature here. If your feature request is related to any issues or discussions, link them here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# These are supported funding model platforms | ||
|
||
github: saeidex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: 🐞 Bug Report | ||
description: Create a bug report to help us improve | ||
title: "bug: " | ||
labels: ["🐞❔ unconfirmed bug"] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Provide environment information | ||
description: | | ||
Run this command in your project root and paste the results in a code block: | ||
```bash | ||
npx envinfo --system --binaries | ||
``` | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of the bug, as well as what you expected to happen when encountering it. | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: Link to reproduction | ||
description: Please provide a link to a reproduction of the bug. Issues without a reproduction repo may be ignored. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: To reproduce | ||
description: Describe how to reproduce your bug. Steps, code snippets, reproduction repos etc. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Additional information | ||
description: Add any other information related to the bug here, screenshots if applicable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
contact_links: | ||
- name: Ask a question | ||
url: https://github.com/t3-oss/create-t3-turbo/discussions | ||
about: Ask questions and discuss with other community members | ||
- name: Feature request | ||
url: https://github.com/t3-oss/create-t3-turbo/discussions/new?category=ideas | ||
about: Feature requests should be opened as discussions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["config:base"], | ||
"packageRules": [ | ||
{ | ||
"matchPackagePatterns": ["^@ubus/"], | ||
"enabled": false | ||
} | ||
], | ||
"updateInternalDeps": true, | ||
"rangeStrategy": "bump", | ||
"automerge": true, | ||
"npm": { | ||
"fileMatch": ["(^|/)package\\.json$", "(^|/)package\\.json\\.hbs$"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: ["*"] | ||
push: | ||
branches: ["main"] | ||
merge_group: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
# You can leverage Vercel Remote Caching with Turbo to speed up your builds | ||
# @link https://turborepo.org/docs/core-concepts/remote-caching#remote-caching-on-vercel-builds | ||
env: | ||
FORCE_COLOR: 3 | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./tooling/github/setup | ||
|
||
- name: Copy env | ||
shell: bash | ||
run: cp .env.example .env | ||
|
||
- name: Lint | ||
run: pnpm lint && pnpm lint:ws | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./tooling/github/setup | ||
|
||
- name: Format | ||
run: pnpm format | ||
|
||
typecheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./tooling/github/setup | ||
|
||
- name: Typecheck | ||
run: pnpm typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# testing | ||
coverage | ||
|
||
# next.js | ||
.next/ | ||
out/ | ||
next-env.d.ts | ||
|
||
# nitro | ||
.nitro/ | ||
.output/ | ||
|
||
# expo | ||
.expo/ | ||
expo-env.d.ts | ||
apps/expo/.gitignore | ||
apps/expo/ios | ||
apps/expo/android | ||
|
||
# production | ||
build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
dist/ | ||
.cache | ||
|
||
# turbo | ||
.turbo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node-linker=hoisted | ||
link-workspace-packages=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"expo.vscode-expo-tools", | ||
"esbenp.prettier-vscode", | ||
"yoavbls.pretty-ts-errors", | ||
"bradlc.vscode-tailwindcss" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Next.js", | ||
"type": "node-terminal", | ||
"request": "launch", | ||
"command": "pnpm dev", | ||
"cwd": "${workspaceFolder}/apps/nextjs/", | ||
"skipFiles": ["<node_internals>/**"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"eslint.workingDirectories": [ | ||
{ | ||
"mode": "auto" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Julius Marminge | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# ubus | ||
|
||
## About | ||
|
||
IUBAT Bus Tracking System to access live bus locations, schedules, and important updates. | ||
|
||
It uses [Turborepo](https://turborepo.org) and contains: | ||
|
||
```text | ||
.github | ||
└─ workflows | ||
└─ CI with pnpm cache setup | ||
.vscode | ||
└─ Recommended extensions and settings for VSCode users | ||
apps | ||
├─ auth-proxy | ||
| ├─ Nitro server to proxy OAuth requests in preview deployments | ||
| └─ Uses Auth.js Core | ||
├─ expo | ||
| ├─ Expo SDK 51 | ||
| ├─ React Native using React 18 | ||
| ├─ Navigation using Expo Router | ||
| ├─ Tailwind using NativeWind | ||
| └─ Typesafe API calls using tRPC | ||
└─ next.js | ||
├─ Next.js 14 | ||
├─ React 18 | ||
├─ Tailwind CSS | ||
└─ E2E Typesafe API Server & Client | ||
packages | ||
├─ api | ||
| └─ tRPC v11 router definition | ||
├─ auth | ||
| └─ Authentication using next-auth. | ||
├─ db | ||
| └─ Typesafe db calls using Drizzle & Supabase | ||
└─ ui | ||
└─ Start of a UI package for the webapp using shadcn-ui | ||
tooling | ||
├─ eslint | ||
| └─ shared, fine-grained, eslint presets | ||
├─ prettier | ||
| └─ shared prettier configuration | ||
├─ tailwind | ||
| └─ shared tailwind configuration | ||
└─ typescript | ||
└─ shared tsconfig you can extend from | ||
``` | ||
|
||
## Quick Start | ||
|
||
To get it running, follow the steps below: | ||
|
||
### 1. Setup dependencies | ||
|
||
```bash | ||
# Install dependencies | ||
pnpm i | ||
|
||
# Configure environment variables | ||
# There is an `.env.example` in the root directory you can use for reference | ||
cp .env.example .env | ||
|
||
# Push the Drizzle schema to the database | ||
pnpm db:push | ||
``` | ||
|
||
### 2. Configure Expo `dev`-script | ||
|
||
#### Use iOS Simulator | ||
|
||
1. Make sure you have XCode and XCommand Line Tools installed [as shown on expo docs](https://docs.expo.dev/workflow/ios-simulator). | ||
|
||
> **NOTE:** If you just installed XCode, or if you have updated it, you need to open the simulator manually once. Run `npx expo start` from `apps/expo`, and then enter `I` to launch Expo Go. After the manual launch, you can run `pnpm dev` in the root directory. | ||
```diff | ||
+ "dev": "expo start --ios", | ||
``` | ||
|
||
2. Run `pnpm dev` at the project root folder. | ||
|
||
#### Use Android Emulator | ||
|
||
1. Install Android Studio tools [as shown on expo docs](https://docs.expo.dev/workflow/android-studio-emulator). | ||
|
||
2. Change the `dev` script at `apps/expo/package.json` to open the Android emulator. | ||
|
||
```diff | ||
+ "dev": "expo start --android", | ||
``` | ||
|
||
3. Run `pnpm dev` at the project root folder. | ||
|
||
### 3a. When it's time to add a new UI component | ||
|
||
Run the `ui-add` script to add a new UI component using the interactive `shadcn/ui` CLI: | ||
|
||
```bash | ||
pnpm ui-add | ||
``` | ||
|
||
When the component(s) has been installed, you should be good to go and start using it in your app. | ||
|
||
### 3b. When it's time to add a new package | ||
|
||
To add a new package, simply run `pnpm turbo gen init` in the monorepo root. This will prompt you for a package name as well as if you want to install any dependencies to the new package (of course you can also do this yourself later). | ||
|
||
The generator sets up the `package.json`, `tsconfig.json` and a `index.ts`, as well as configures all the necessary configurations for tooling around your package such as formatting, linting and typechecking. When the package is created, you're ready to go build out the package. | ||
|
||
## References | ||
|
||
The stack originates from [create-t3-app](https://github.com/t3-oss/create-t3-app). | ||
|
||
A [blog post](https://jumr.dev/blog/t3-turbo) where I wrote how to migrate a T3 app into this. |
Oops, something went wrong.