Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement monorepo #7

Merged
merged 41 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9cb8de3
fix(deps): switch to pnpm
airone01 Mar 27, 2024
a80028e
build: add turborepo
airone01 Mar 27, 2024
7a44fae
fix(.editorconfig): move to repo root
airone01 Mar 27, 2024
ebe40f8
fix(.turno): untrack
airone01 Mar 27, 2024
37f16d9
chore(husky): pach commitlint, husky and commitizen
airone01 Mar 28, 2024
48cd3d1
chore(package.json): move commit script to commitmake for fix
airone01 Mar 28, 2024
4bb3eb7
fix(merge): patch the commit flow
airone01 Mar 28, 2024
7cbe91d
chore(commitlint): implement with commitizen
airone01 Apr 2, 2024
3bf9e5a
refactor(noconverter): rename to 0n0/converter
airone01 Apr 2, 2024
7bab3f0
fix(media-player.tsx): add file info
airone01 Apr 3, 2024
f7961e1
ci(feat): add changeset
airone01 Apr 3, 2024
98463c9
ci(actions): fix commitlint action
airone01 Apr 3, 2024
eaadf79
docs(changesets): add some changesets
airone01 Apr 3, 2024
8950997
chore(.npmrc): implement with basic config
airone01 Apr 3, 2024
e43e7ce
docs(changelog): concatenate changesets
airone01 Apr 3, 2024
19f2eef
refactor(ui): create /packages/ui workspace
airone01 Apr 3, 2024
477e7a8
refactor(ui): setup xo, shadcn/ui and other configs
airone01 Apr 3, 2024
87f3eb6
refactor(ui): copy button
airone01 Apr 3, 2024
e54ca4a
refactor(ui): copy card
airone01 Apr 3, 2024
3b106c2
refactor(ui): copy carousel
airone01 Apr 3, 2024
0ce3a12
refactor(ui): add dialog
airone01 Apr 3, 2024
5329827
refactor(ui): add drawer
airone01 Apr 3, 2024
83dc886
refactor(ui): add dropdown menu
airone01 Apr 3, 2024
6551e3f
refactor(ui): add input
airone01 Apr 3, 2024
1140719
chore(pnpm-lock.json): patch deps
airone01 Apr 3, 2024
38d82bf
refactor(ui): add label
airone01 Apr 3, 2024
97f2404
refactor(ui): add dark mode toggle
airone01 Apr 3, 2024
cb18904
refactor(ui): add popover
airone01 Apr 3, 2024
a3ddd0f
refactor(ui): add separator
airone01 Apr 3, 2024
ec0bc58
refactor(ui): add toast
airone01 Apr 3, 2024
dd91971
docs(changeset): describe changes
airone01 Apr 3, 2024
c12d2b8
refactor(ui): replace all components with calls to @0n0/ui
airone01 Apr 7, 2024
a03c0d0
chore(configs): move tailwind and postcss configs to @0n0/tailwind-co…
airone01 Apr 8, 2024
f343330
docs(changeset): move all general components to @0n0/ui
airone01 Apr 8, 2024
e26bfba
feat(ui): add new themes with mode-toggle
airone01 Apr 9, 2024
056234f
ci(fix): patch commitlint by installing pnpm
airone01 Apr 9, 2024
44f9057
ci(lint.yml): add linting with xo
airone01 Apr 9, 2024
96263c9
ci(lint.yml): move commitlint to lint.yml
airone01 Apr 9, 2024
ecd9665
ci(lint.yml): rename `lint` job to `xo`
airone01 Apr 9, 2024
7107e7c
ci(release): patch to work with changesets
airone01 Apr 10, 2024
a291c14
ci(changesets.yml): execute on dev branch, not main
airone01 Apr 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
6 changes: 6 additions & 0 deletions .changeset/afraid-wolves-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"converter": minor
"@0n0/ui": minor
---

Replace all UI components from the converter to @0n0/ui
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
7 changes: 7 additions & 0 deletions .changeset/eighty-planets-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"converter": minor
"@0n0/ui": minor
"@0n0/tailwind-config": minor
---

Move TailwindCSS and PostCSS configs to @0n0/tailwind-config
5 changes: 5 additions & 0 deletions .changeset/honest-lizards-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@0n0/ui": minor
---

Add plenty of new themes
6 changes: 6 additions & 0 deletions .changeset/mean-seas-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"converter": major
"@0n0/ui": major
---

Move general components from @0n0/converter to @0n0/ui
5 changes: 5 additions & 0 deletions .changeset/new-ties-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@0n0/ui": minor
---

Copied most components from the converter
37 changes: 0 additions & 37 deletions .eslintrc.cjs

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Changesets

on:
push:
branches:
- dev

env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
HUSKY: 0

jobs:
release:
name: Make release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11"
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup npmrc
run: echo "//ghcr.io/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Install Dependencies
run: pnpm i
- name: Create Release Pull Request
id: changesets
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68 changes: 68 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Lint

on: [push, pull_request]

jobs:
xo:
name: Lint code with xo
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11"
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Print versions
run: |
git --version
node --version
npm --version
pnpm --version
pnpx xo --version
- name: Install deps
run: |
pnpm i
- name: Lint repo
run: |
pnpm run turbo lint

commitlint:
name: Lint commits with commitlint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11"
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Print versions
run: |
git --version
node --version
npm --version
pnpm --version
pnpx commitlint --version
- name: Install commitlint
run: |
pnpm add -w conventional-changelog-conventionalcommits
pnpm add -w commitlint@latest
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: pnpx commitlint --last --verbose
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: pnpx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
21 changes: 0 additions & 21 deletions .github/workflows/semantic-release.yml

This file was deleted.

8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/**/node_modules/
/.pnp
.pnp.js

Expand Down Expand Up @@ -40,3 +40,9 @@ yarn-error.log*

# typescript
*.tsbuildinfo

# turborepo
/**/.turbo/

# pnpm
/**/.pnpm-store/
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bun run commitlint ${1}
npm run commitlint ${1}
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

3 changes: 2 additions & 1 deletion .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
exec < /dev/tty && bunx --bun cz -- --hook || true
#!/bin/bash
exec </dev/tty && node_modules/.bin/cz --hook || true
23 changes: 8 additions & 15 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# NoConverter

A self-hostable web file converter.

## Technologies used

| Conventions | [![Conventional Commits Badge](https://img.shields.io/badge/Conventional%20Commits-FE5196?logo=conventionalcommits&logoColor=fff&style=flat)](http://commitizen.github.io/cz-cli/) [![commitlint Badge](https://img.shields.io/badge/commitlint-000?logo=commitlint&logoColor=fff&style=flat)](https://commitlint.js.org/) [![XO Badge](https://img.shields.io/badge/XO-5ED9C7?logo=xo&logoColor=000&style=flat)](https://github.com/xojs/xo) |
| - | - |
| Backend | [![TypeScript Badge](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=fff&style=flat)](https://www.typescriptlang.org/) [![Bun Badge](https://img.shields.io/badge/Bun-000?logo=bun&logoColor=fff&style=flat)](https://bun.sh/) [![Next.js Badge](https://img.shields.io/badge/Next.js-000?logo=nextdotjs&logoColor=fff&style=flat)](https://nextjs.org/) |
| Frontend | [![React Badge](https://img.shields.io/badge/React-61DAFB?logo=react&logoColor=000&style=flat)](https://react.dev/) [![Tailwind CSS Badge](https://img.shields.io/badge/Tailwind%20CSS-06B6D4?logo=tailwindcss&logoColor=fff&style=flat)](https://tailwindcss.com/) [![shadcn/ui Badge](https://img.shields.io/badge/shadcn%2Fui-000?logo=shadcnui&logoColor=fff&style=flat)](https://ui.shadcn.com/) |
| Conversion | [![WebAssembly Badge](https://img.shields.io/badge/WebAssembly-654FF0?logo=webassembly&logoColor=fff&style=flat)](https://webassembly.org/) [![FFmpeg.WASM Badge](https://img.shields.io/badge/FFmpeg.WASM-654FF0?logo=ffmpeg&logoColor=fff&style=flat)](https://ffmpegwasm.netlify.app/) |
<div align="center">
<svg width="195.601" height="76.102" viewBox="0 0 195.601 76.102" xmlns="http://www.w3.org/2000/svg"><g id="svgGroup" stroke-linecap="round" fill-rule="evenodd" font-size="9pt" stroke="currentColor" stroke-width="0.25mm" fill="currentColor" style="stroke:currentColor;stroke-width:0.25mm;fill:currentColor"><path d="M 72.6 73.001 L 72.6 24.401 Q 72.6 22.301 74.3 22.301 L 88.5 22.301 Q 89.856 22.301 90.131 23.446 A 2.817 2.817 0 0 1 90.2 24.101 L 90.2 28.901 Q 90.2 29.501 90.5 29.651 A 0.336 0.336 0 0 0 90.642 29.685 Q 90.928 29.694 91.4 29.301 Q 93.7 26.901 96.3 25.101 Q 98.9 23.301 101.75 22.301 A 18.077 18.077 0 0 1 107.576 21.302 A 20.363 20.363 0 0 1 107.8 21.301 A 18.837 18.837 0 0 1 112.928 21.964 A 14.262 14.262 0 0 1 119.25 25.651 A 14.528 14.528 0 0 1 123.256 33.428 A 20.832 20.832 0 0 1 123.6 37.301 L 123.6 72.601 Q 123.6 75.301 120.8 75.301 L 107.9 75.301 Q 106.7 75.301 106.25 74.801 A 1.364 1.364 0 0 1 106.004 74.386 Q 105.846 73.988 105.81 73.372 A 6.526 6.526 0 0 1 105.8 73.001 L 105.8 39.801 A 7.593 7.593 0 0 0 105.614 38.066 Q 105.246 36.497 104.15 35.501 A 5.409 5.409 0 0 0 102.016 34.33 Q 100.907 34.001 99.5 34.001 A 9.521 9.521 0 0 0 97.042 34.311 A 8.583 8.583 0 0 0 96.15 34.601 A 9.18 9.18 0 0 0 94.022 35.782 A 11.217 11.217 0 0 0 93.2 36.451 A 17.24 17.24 0 0 0 91.822 37.839 Q 91.111 38.636 90.4 39.601 L 90.4 72.701 A 3.2 3.2 0 0 1 90.227 73.8 Q 89.715 75.204 87.687 75.294 A 6.431 6.431 0 0 1 87.4 75.301 L 75 75.301 A 4.95 4.95 0 0 1 74.963 75.301 Q 72.6 75.283 72.6 73.001 Z M 42.241 1.71 A 29.726 29.726 0 0 0 32.1 0.001 A 33.97 33.97 0 0 0 30.368 0.044 A 28.895 28.895 0 0 0 19.25 2.801 Q 13.4 5.601 9.05 10.751 A 33.952 33.952 0 0 0 6.411 14.33 A 38.461 38.461 0 0 0 2.35 22.901 A 43.226 43.226 0 0 0 0.744 29.313 A 53.382 53.382 0 0 0 0 38.401 A 54.382 54.382 0 0 0 0.67 47.117 A 40.346 40.346 0 0 0 4.05 58.151 A 37.687 37.687 0 0 0 4.838 59.703 A 31.258 31.258 0 0 0 15.4 71.351 A 28.636 28.636 0 0 0 21.678 74.426 A 31.668 31.668 0 0 0 32.1 76.101 Q 41.4 76.101 48.6 71.351 A 30.527 30.527 0 0 0 53.939 66.881 A 34.299 34.299 0 0 0 59.9 58.151 Q 64 49.701 64 38.401 A 55.126 55.126 0 0 0 63.717 32.734 A 44.254 44.254 0 0 0 61.6 22.901 A 44.212 44.212 0 0 0 60.374 19.721 A 37.07 37.07 0 0 0 54.95 10.751 Q 50.7 5.601 44.85 2.801 A 27.992 27.992 0 0 0 42.241 1.71 Z M 173.841 1.71 A 29.726 29.726 0 0 0 163.7 0.001 A 33.97 33.97 0 0 0 161.968 0.044 A 28.895 28.895 0 0 0 150.85 2.801 Q 145 5.601 140.65 10.751 A 33.952 33.952 0 0 0 138.011 14.33 A 38.461 38.461 0 0 0 133.95 22.901 A 43.226 43.226 0 0 0 132.344 29.313 A 53.382 53.382 0 0 0 131.6 38.401 A 54.382 54.382 0 0 0 132.27 47.117 A 40.346 40.346 0 0 0 135.65 58.151 A 37.687 37.687 0 0 0 136.438 59.703 A 31.258 31.258 0 0 0 147 71.351 A 28.636 28.636 0 0 0 153.278 74.426 A 31.668 31.668 0 0 0 163.7 76.101 Q 173 76.101 180.2 71.351 A 30.527 30.527 0 0 0 185.539 66.881 A 34.299 34.299 0 0 0 191.5 58.151 Q 195.6 49.701 195.6 38.401 A 55.126 55.126 0 0 0 195.317 32.734 A 44.254 44.254 0 0 0 193.2 22.901 A 44.212 44.212 0 0 0 191.974 19.721 A 37.07 37.07 0 0 0 186.55 10.751 Q 182.3 5.601 176.45 2.801 A 27.992 27.992 0 0 0 173.841 1.71 Z M 32 62.101 Q 36 62.101 38.55 59.751 A 9.873 9.873 0 0 0 40.398 57.383 Q 41.587 55.311 42.3 52.251 A 37.345 37.345 0 0 0 42.933 48.695 Q 43.5 44.413 43.5 38.501 A 104.771 104.771 0 0 0 43.378 33.28 Q 43.114 28 42.278 24.321 A 30.935 30.935 0 0 0 42.25 24.201 A 25.551 25.551 0 0 0 41.355 21.149 Q 40.213 18.045 38.45 16.351 Q 35.9 13.901 32 13.901 A 10.675 10.675 0 0 0 28.936 14.321 A 8.447 8.447 0 0 0 25.45 16.351 Q 23.633 18.096 22.502 21.365 A 25.785 25.785 0 0 0 21.7 24.251 Q 20.894 27.912 20.63 33.086 A 106.355 106.355 0 0 0 20.5 38.501 A 99.801 99.801 0 0 0 20.618 43.491 Q 20.874 48.605 21.694 52.172 A 30.204 30.204 0 0 0 21.7 52.201 A 22.829 22.829 0 0 0 22.587 55.172 Q 23.713 58.135 25.5 59.751 A 9.034 9.034 0 0 0 30.813 62.043 A 12.007 12.007 0 0 0 32 62.101 Z M 163.6 62.101 Q 167.6 62.101 170.15 59.751 A 9.873 9.873 0 0 0 171.998 57.383 Q 173.187 55.311 173.9 52.251 A 37.345 37.345 0 0 0 174.533 48.695 Q 175.1 44.413 175.1 38.501 A 104.771 104.771 0 0 0 174.978 33.28 Q 174.714 28 173.878 24.321 A 30.935 30.935 0 0 0 173.85 24.201 A 25.551 25.551 0 0 0 172.955 21.149 Q 171.813 18.045 170.05 16.351 Q 167.5 13.901 163.6 13.901 A 10.675 10.675 0 0 0 160.536 14.321 A 8.447 8.447 0 0 0 157.05 16.351 Q 155.233 18.096 154.102 21.365 A 25.785 25.785 0 0 0 153.3 24.251 Q 152.494 27.912 152.23 33.086 A 106.355 106.355 0 0 0 152.1 38.501 A 99.801 99.801 0 0 0 152.218 43.491 Q 152.474 48.605 153.294 52.172 A 30.204 30.204 0 0 0 153.3 52.201 A 22.829 22.829 0 0 0 154.187 55.172 Q 155.313 58.135 157.1 59.751 A 9.034 9.034 0 0 0 162.413 62.043 A 12.007 12.007 0 0 0 163.6 62.101 Z" vector-effect="non-scaling-stroke"/></g></svg>
<br />
<img src=https://skillicons.dev/icons?i=nextjs,wasm,ts,pnpm />
<br />
<p>Just making websites.</p>
</div>

## Note

> [!IMPORTANT]
> NoConverter is an active work-in-progress. Expect breaking changes and bugs.

> [!IMPORTANT]
> NoConverter is designed to be self-hosted, and *the conversion processing runs on the web client's hardware thanks to WebAssembly*, not on the server. Thanks to that, you can run it on your own server and convert files without uploading them to a third-party service.
> This is an active work-in-progress. Expect breaking changes and bugs.
File renamed without changes.
37 changes: 37 additions & 0 deletions apps/converter/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/** @type {import("eslint").Linter.Config} */
const config = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
plugins: ['@typescript-eslint'],
extends: [
'next/core-web-vitals',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
rules: {
// These opinionated rules are enabled in stylistic-type-checked above.
// Feel free to reconfigure them to your own preference.
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',

'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
},
],
'@typescript-eslint/no-unused-vars': ['warn', {argsIgnorePattern: '^_'}],
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: {attributes: false},
},
],
},
};

module.exports = config;
42 changes: 42 additions & 0 deletions apps/converter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal

# next.js
/.next/
/out/
next-env.d.ts

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
2 changes: 1 addition & 1 deletion .xo-config.json → apps/converter/.xo-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"rules": {
"import/extensions": "off"
}
}
}
16 changes: 16 additions & 0 deletions apps/converter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# converter

## 1.0.0

### Major Changes

- eaadf79: Rename project to `0n0` and implement monorepo

### Minor Changes

- eaadf79: Add dark mode and switch
- eaadf79: Implement ffmpeg.wasm in the app
- eaadf79: Add cool title
- eaadf79: Bootstrap converter from CT3A
- eaadf79: Build web UI with file picker
- eaadf79: Implement styling with TailwindCSS, shadcn/ui and Aceternity UI
Loading
Loading