├── .env.example ├── CHANGELOG.md ├── tooling ├── github │ ├── package.json │ └── setup │ │ └── action.yml ├── typescript │ ├── package.json │ ├── react-library.json │ └── base.json ├── prettier │ ├── package.json │ └── index.js └── eslint │ ├── nextjs.js │ ├── package.json │ ├── react.js │ └── base.js ├── apps ├── desktop │ ├── src │ │ ├── vite-env.d.ts │ │ ├── assets │ │ │ └── icon.png │ │ └── main.tsx │ ├── public │ │ └── icon.png │ ├── postcss.config.js │ ├── tailwind.config.js │ ├── tsconfig.node.json │ ├── index.html │ ├── electron │ │ ├── electron-env.d.ts │ │ ├── main.ts │ │ └── preload.ts │ ├── tsconfig.json │ ├── vite.config.ts │ ├── package.json │ └── electron-builder.json5 ├── api │ ├── src │ │ ├── accounts │ │ │ ├── dto │ │ │ │ ├── create-account.dto.ts │ │ │ │ └── update-account.dto.ts │ │ │ ├── accounts.service.ts │ │ │ ├── accounts.module.ts │ │ │ ├── accounts.controller.ts │ │ │ ├── accounts.service.spec.ts │ │ │ └── accounts.controller.spec.ts │ │ ├── ping │ │ │ ├── ping.controller.ts │ │ │ ├── ping.module.ts │ │ │ └── ping.controller.spec.ts │ │ ├── transactions │ │ │ ├── transactions.module.ts │ │ │ ├── transactions.service.spec.ts │ │ │ ├── dto │ │ │ │ └── create-transaction.dto.ts │ │ │ ├── transactions.controller.spec.ts │ │ │ ├── transactions.service.ts │ │ │ └── transactions.controller.ts │ │ ├── app.module.ts │ │ └── main.ts │ ├── tsconfig.build.json │ ├── nest-cli.json │ ├── test │ │ ├── jest-e2e.json │ │ └── app.e2e-spec.ts │ ├── tsconfig.json │ ├── package.json │ └── README.md ├── frontend │ ├── app │ │ ├── globals.css │ │ ├── layout.tsx │ │ └── page.tsx │ ├── public │ │ ├── sloth.png │ │ ├── vercel.svg │ │ ├── circles.svg │ │ ├── next.svg │ │ └── turborepo.svg │ ├── .gitignore │ ├── postcss.config.js │ ├── next.config.js │ ├── tailwind.config.js │ ├── tsconfig.json │ ├── e2e │ │ └── example.spec.ts │ ├── package.json │ ├── README.md │ └── playwright.config.ts ├── mobile │ ├── assets │ │ ├── icon.png │ │ ├── splash.png │ │ ├── favicon.png │ │ └── adaptive-icon.png │ ├── src │ │ ├── __tests__ │ │ │ └── app.test.ts │ │ └── App.tsx │ ├── tsconfig.json │ ├── babel.config.js │ ├── .gitignore │ ├── index.js │ ├── config │ │ └── setupDetox.json │ ├── e2e │ │ ├── jest.config.js │ │ └── starter.test.ts │ ├── jest.config.js │ ├── app.json │ ├── metro.config.js │ ├── eas.json │ ├── package.json │ ├── .detoxrc.js │ └── report.json ├── extension │ ├── assets │ │ └── icon.png │ ├── postcss.config.js │ ├── tailwind.config.js │ ├── src │ │ ├── contents │ │ │ ├── plasmo.ts │ │ │ └── google-sidebar.tsx │ │ ├── popup.tsx │ │ └── style.css │ ├── tsconfig.json │ └── package.json └── scraper │ ├── tsconfig.json │ ├── package.json │ └── src │ └── main.ts ├── .npmrc ├── assets ├── apps.png └── onelove.png ├── pnpm-workspace.yaml ├── tsconfig.json ├── packages └── ui │ ├── postcss.config.js │ ├── lib │ └── utils.ts │ ├── components.json │ ├── tsconfig.json │ ├── tsup.config.ts │ ├── components │ ├── index.ts │ ├── ui │ │ ├── label.tsx │ │ ├── input.tsx │ │ ├── checkbox.tsx │ │ ├── popover.tsx │ │ ├── button.tsx │ │ ├── card.tsx │ │ ├── calendar.tsx │ │ ├── table.tsx │ │ ├── dropdown-menu.tsx │ │ └── icons.tsx │ ├── auth │ │ ├── page.tsx │ │ └── form.tsx │ ├── layout │ │ ├── footer.tsx │ │ └── navbar.tsx │ └── landing │ │ └── hero.tsx │ ├── package.json │ ├── styles │ └── globals.css │ └── tailwind.config.js ├── .github └── workflows │ ├── welcome.yaml │ ├── frontend-e2e.yml │ └── pull-request.yaml ├── lefthook.yml ├── renovate.json ├── .gitignore ├── LICENSE ├── turbo.json ├── package.json └── README.md /.env.example: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | --------- -------------------------------------------------------------------------------- /tooling/github/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@acme/github" 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | node-linker=hoisted 2 | public-hoist-pattern=* 3 | shamefully-hoist=true -------------------------------------------------------------------------------- /apps/api/src/accounts/dto/create-account.dto.ts: -------------------------------------------------------------------------------- 1 | export class CreateAccountDto {} 2 | -------------------------------------------------------------------------------- /assets/apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/assets/apps.png -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'apps/*' 3 | - 'packages/*' 4 | - 'tooling/*' 5 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": {}, 3 | "extends": "expo/tsconfig.base" 4 | } 5 | -------------------------------------------------------------------------------- /assets/onelove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/assets/onelove.png -------------------------------------------------------------------------------- /apps/frontend/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /apps/mobile/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/apps/mobile/assets/icon.png -------------------------------------------------------------------------------- /apps/desktop/public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/apps/desktop/public/icon.png -------------------------------------------------------------------------------- /apps/mobile/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/apps/mobile/assets/splash.png -------------------------------------------------------------------------------- /apps/desktop/src/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/apps/desktop/src/assets/icon.png -------------------------------------------------------------------------------- /apps/extension/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/apps/extension/assets/icon.png -------------------------------------------------------------------------------- /apps/frontend/public/sloth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/apps/frontend/public/sloth.png -------------------------------------------------------------------------------- /apps/mobile/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/apps/mobile/assets/favicon.png -------------------------------------------------------------------------------- /apps/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | /test-results/ 3 | /playwright-report/ 4 | /blob-report/ 5 | /playwright/.cache/ 6 | -------------------------------------------------------------------------------- /apps/mobile/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suchcodemuchwow/onelove/HEAD/apps/mobile/assets/adaptive-icon.png -------------------------------------------------------------------------------- /apps/desktop/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/ui/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/api/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "build", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/extension/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/mobile/src/__tests__/app.test.ts: -------------------------------------------------------------------------------- 1 | describe("App", () => { 2 | it("should be true", () => { 3 | expect(true).toBe(true); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /apps/mobile/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../node_modules/expo/tsconfig.base.json", 3 | "compilerOptions": { 4 | "strict": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/mobile/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /apps/frontend/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | module.exports = { 3 | reactStrictMode: true, 4 | transpilePackages: ["@acme/ui"], 5 | }; 6 | -------------------------------------------------------------------------------- /apps/api/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/api/src/ping/ping.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from "@nestjs/common"; 2 | 3 | @Controller("ping") 4 | export class PingController { 5 | @Get() 6 | ping() { 7 | return "pong"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/frontend/tailwind.config.js: -------------------------------------------------------------------------------- 1 | import shadcnConfig from "@acme/ui/tailwind.config"; 2 | 3 | const combined = { 4 | content: ["./app/**/*.tsx"], 5 | presets: [shadcnConfig], 6 | }; 7 | 8 | export default combined; 9 | -------------------------------------------------------------------------------- /tooling/typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@acme/tsconfig", 3 | "private": true, 4 | "version": "0.1.0", 5 | "files": [ 6 | "base.json" 7 | ], 8 | "publishConfig": { 9 | "access": "public" 10 | } 11 | } -------------------------------------------------------------------------------- /apps/api/src/accounts/dto/update-account.dto.ts: -------------------------------------------------------------------------------- 1 | import { PartialType } from "@nestjs/swagger"; 2 | 3 | import { CreateAccountDto } from "./create-account.dto"; 4 | 5 | export class UpdateAccountDto extends PartialType(CreateAccountDto) {} 6 | -------------------------------------------------------------------------------- /packages/ui/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import type { ClassValue } from "clsx"; 2 | import { clsx } from "clsx"; 3 | import { twMerge } from "tailwind-merge"; 4 | 5 | export function cn(...inputs: ClassValue[]) { 6 | return twMerge(clsx(inputs)); 7 | } 8 | -------------------------------------------------------------------------------- /apps/desktop/tailwind.config.js: -------------------------------------------------------------------------------- 1 | import shadcnConfig from "@acme/ui/tailwind.config"; 2 | 3 | const combined = { 4 | content: ["./src/**/*.tsx"], 5 | presets: [shadcnConfig], 6 | jit: true, 7 | }; 8 | 9 | export default combined; 10 | -------------------------------------------------------------------------------- /apps/api/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.github/workflows/welcome.yaml: -------------------------------------------------------------------------------- 1 | name: Welcome to Onelove 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | checkout-repo: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v4 12 | 13 | - run: ls -la -------------------------------------------------------------------------------- /apps/api/src/ping/ping.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from "@nestjs/common"; 2 | 3 | import { PingController } from "./ping.controller"; 4 | 5 | @Module({ 6 | controllers: [PingController], 7 | providers: [], 8 | }) 9 | export class PingModule {} 10 | -------------------------------------------------------------------------------- /apps/mobile/.gitignore: -------------------------------------------------------------------------------- 1 | # Expo 2 | /android 3 | /ios 4 | 5 | __generated__ 6 | node_modules 7 | .expo/* 8 | npm-debug.* 9 | *.jks 10 | *.p8 11 | *.p12 12 | *.key 13 | *.mobileprovision 14 | *.orig.* 15 | web-build/ 16 | 17 | # macOS 18 | .DS_Store 19 | -------------------------------------------------------------------------------- /apps/extension/tailwind.config.js: -------------------------------------------------------------------------------- 1 | import shadcnConfig from "@acme/ui/tailwind.config"; 2 | 3 | const config = { 4 | ...shadcnConfig, 5 | jit: true, 6 | content: ["./src/**/*.{ts,tsx}", "../../packages/ui/**/*.{ts,tsx}"], 7 | }; 8 | 9 | export default config; 10 | -------------------------------------------------------------------------------- /apps/desktop/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/api/src/accounts/accounts.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from "@nestjs/common"; 2 | 3 | @Injectable() 4 | export class AccountsService { 5 | findOne(id: string) { 6 | return { 7 | id, 8 | balance: 1000, 9 | name: "Account 1", 10 | }; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/ui/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tailwind": { 6 | "config": "tailwind.config.js", 7 | "css": "styles/globals.css", 8 | "baseColor": "slate", 9 | "cssVariables": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/scraper/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@acme/tsconfig/base.json", "@apify/tsconfig"], 3 | "compilerOptions": { 4 | "module": "ES2022", 5 | "target": "ES2022", 6 | "outDir": "build", 7 | "noUnusedLocals": false, 8 | "lib": ["DOM"] 9 | }, 10 | "include": ["./src/**/*"] 11 | } 12 | -------------------------------------------------------------------------------- /apps/api/src/accounts/accounts.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from "@nestjs/common"; 2 | 3 | import { AccountsController } from "./accounts.controller"; 4 | import { AccountsService } from "./accounts.service"; 5 | 6 | @Module({ 7 | controllers: [AccountsController], 8 | providers: [AccountsService], 9 | }) 10 | export class AccountsModule {} 11 | -------------------------------------------------------------------------------- /apps/mobile/index.js: -------------------------------------------------------------------------------- 1 | import { registerRootComponent } from "expo"; 2 | 3 | import App from "./src/App"; 4 | 5 | // registerRootComponent calls AppRegistry.registerComponent('main', () => App); 6 | // It also ensures that whether you load the app in the Expo client or in a native build, 7 | // the environment is set up appropriately 8 | registerRootComponent(App); 9 | -------------------------------------------------------------------------------- /tooling/typescript/react-library.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "React Library", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "react-jsx", 7 | "lib": [ 8 | "ES2015" 9 | ], 10 | "module": "ESNext", 11 | "target": "es6" 12 | } 13 | } -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@acme/tsconfig/react-library.json", 3 | "compilerOptions": { 4 | "paths": { 5 | "@ui/*": ["./*"] 6 | }, 7 | "baseUrl": "." 8 | }, 9 | "include": ["."], 10 | "exclude": [ 11 | "dist", 12 | "build", 13 | "node_modules", 14 | "postcss.config.js", 15 | "tailwind.config.js" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /apps/api/src/transactions/transactions.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from "@nestjs/common"; 2 | 3 | import { TransactionsController } from "./transactions.controller"; 4 | import { TransactionsService } from "./transactions.service"; 5 | 6 | @Module({ 7 | controllers: [TransactionsController], 8 | providers: [TransactionsService], 9 | }) 10 | export class TransactionsModule {} 11 | -------------------------------------------------------------------------------- /apps/mobile/src/App.tsx: -------------------------------------------------------------------------------- 1 | import { Text, View } from "react-native"; 2 | import { StatusBar } from "expo-status-bar"; 3 | 4 | export default function App() { 5 | return ( 6 | 7 | 8 | Hello World! 👋 9 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/ui/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from "tsup"; 2 | import { defineConfig } from "tsup"; 3 | 4 | export default defineConfig((options: Options) => ({ 5 | treeshake: true, 6 | splitting: true, 7 | entry: ["components/**/*.tsx"], 8 | format: ["esm"], 9 | dts: true, 10 | minify: true, 11 | clean: true, 12 | external: ["react"], 13 | ...options, 14 | })); 15 | -------------------------------------------------------------------------------- /tooling/prettier/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@acme/prettier-config", 3 | "private": true, 4 | "version": "0.1.0", 5 | "type": "module", 6 | "exports": { 7 | ".": "./index.js" 8 | }, 9 | "scripts": { 10 | "clean": "rm -rf .turbo node_modules", 11 | "format": "prettier --check . --ignore-path ../../.gitignore" 12 | }, 13 | "prettier": "@acme/prettier-config" 14 | } 15 | -------------------------------------------------------------------------------- /apps/mobile/config/setupDetox.json: -------------------------------------------------------------------------------- 1 | { 2 | "rootDir": "..", 3 | "testMatch": ["/e2e/**/*.test.ts"], 4 | "testTimeout": 120000, 5 | "maxWorkers": 1, 6 | "globalSetup": "detox/runners/jest/globalSetup", 7 | "globalTeardown": "detox/runners/jest/globalTeardown", 8 | "reporters": ["detox/runners/jest/reporter"], 9 | "testEnvironment": "detox/runners/jest/testEnvironment", 10 | "verbose": true 11 | } 12 | -------------------------------------------------------------------------------- /apps/extension/src/contents/plasmo.ts: -------------------------------------------------------------------------------- 1 | import type { PlasmoCSConfig } from "plasmo"; 2 | 3 | export const config: PlasmoCSConfig = { 4 | matches: [ 5 | "https://www.plasmo.com/*", 6 | `http://localhost:${process.env.PLASMO_PUBLIC_DEV_PORT}/*`, 7 | ], 8 | }; 9 | 10 | window.addEventListener("load", () => { 11 | console.log("content script loaded"); 12 | 13 | document.body.style.background = "pink"; 14 | }); 15 | -------------------------------------------------------------------------------- /tooling/github/setup/action.yml: -------------------------------------------------------------------------------- 1 | name: "Setup and install" 2 | description: "Common setup steps for Actions" 3 | 4 | runs: 5 | using: composite 6 | steps: 7 | - uses: pnpm/action-setup@v2 8 | - uses: actions/setup-node@v4 9 | with: 10 | node-version: 18 11 | cache: "pnpm" 12 | 13 | - shell: bash 14 | run: pnpm add -g turbo 15 | 16 | - shell: bash 17 | run: pnpm install 18 | -------------------------------------------------------------------------------- /apps/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@acme/tsconfig/base.json", 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "plugins": [ 6 | { 7 | "name": "next" 8 | } 9 | ], 10 | "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" 11 | }, 12 | "include": ["./app/**/*.ts", "./app/**/*.tsx", ".next/types/**/*.ts"], 13 | "exclude": ["node_modules", "next.config.js", "postcss.config.js"] 14 | } 15 | -------------------------------------------------------------------------------- /apps/extension/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@acme/tsconfig/base.json", 4 | "../../node_modules/plasmo/templates/tsconfig.base.json" 5 | ], 6 | "exclude": ["node_modules", ".plasmo", "build", "postcss.config.js"], 7 | "include": [ 8 | ".plasmo/index.d.ts", 9 | "./src/**/*.ts", 10 | "./src/**/*.tsx", 11 | "./src/**/*.js", 12 | "./src/**/*.jsx" 13 | ], 14 | "compilerOptions": { 15 | "strictNullChecks": true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /apps/mobile/e2e/jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('@jest/types').Config.InitialOptions} */ 2 | module.exports = { 3 | rootDir: "..", 4 | testMatch: ["/e2e/**/*.test.ts"], 5 | testTimeout: 120000, 6 | maxWorkers: 1, 7 | globalSetup: "detox/runners/jest/globalSetup", 8 | globalTeardown: "detox/runners/jest/globalTeardown", 9 | reporters: ["detox/runners/jest/reporter"], 10 | testEnvironment: "detox/runners/jest/testEnvironment", 11 | verbose: true, 12 | }; 13 | -------------------------------------------------------------------------------- /lefthook.yml: -------------------------------------------------------------------------------- 1 | # EXAMPLE USAGE: 2 | # 3 | # Refer for explanation to following link: 4 | # https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md 5 | # 6 | pre-push: 7 | commands: 8 | test: 9 | run: pnpm test 10 | build: 11 | run: pnpm build 12 | 13 | pre-commit: 14 | parallel: true 15 | commands: 16 | eslint: 17 | run: pnpm lint 18 | prettier: 19 | run: pnpm format 20 | typecheck: 21 | run: pnpm typecheck -------------------------------------------------------------------------------- /tooling/eslint/nextjs.js: -------------------------------------------------------------------------------- 1 | /** @type {import('eslint').Linter.Config} */ 2 | const config = { 3 | extends: ["plugin:@next/next/recommended"], 4 | rules: { 5 | "@next/next/no-html-link-for-pages": "off", 6 | "@typescript-eslint/require-await": "off", 7 | "react/jsx-curly-brace-presence": [ 8 | "error", 9 | { 10 | props: "always", 11 | children: "ignore", 12 | propElementValues: "always", 13 | }, 14 | ], 15 | }, 16 | }; 17 | 18 | module.exports = config; 19 | -------------------------------------------------------------------------------- /apps/api/src/accounts/accounts.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get, Param, ParseUUIDPipe } from "@nestjs/common"; 2 | 3 | import { AccountsService } from "./accounts.service"; 4 | 5 | @Controller("accounts") 6 | export class AccountsController { 7 | constructor(private readonly accountsService: AccountsService) {} 8 | 9 | @Get(":account_id") 10 | findOne( 11 | @Param("account_id", new ParseUUIDPipe({ version: "4" })) id: string, 12 | ) { 13 | return this.accountsService.findOne(id); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/desktop/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Onelove 8 | 9 | 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tooling/eslint/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@acme/eslint-config", 3 | "version": "0.2.0", 4 | "private": true, 5 | "license": "MIT", 6 | "files": [ 7 | "./base.js", 8 | "./nextjs.js", 9 | "./react.js" 10 | ], 11 | "scripts": { 12 | "clean": "rm -rf .turbo node_modules", 13 | "format": "prettier --check . --ignore-path ../../.gitignore" 14 | }, 15 | "eslintConfig": { 16 | "root": true, 17 | "extends": [ 18 | "./base.js" 19 | ] 20 | }, 21 | "prettier": "@acme/prettier-config" 22 | } 23 | -------------------------------------------------------------------------------- /packages/ui/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./ui/button"; 2 | export * from "./ui/input"; 3 | export * from "./ui/table"; 4 | export * from "./ui/dropdown-menu"; 5 | export * from "./ui/checkbox"; 6 | export * from "./ui/calendar"; 7 | export * from "./ui/label"; 8 | export * from "./ui/icons"; 9 | export * from "./ui/card"; 10 | export * from "./ui/popover"; 11 | 12 | export * from "./auth/form"; 13 | export * from "./auth/page"; 14 | 15 | export * from "./layout/footer"; 16 | export * from "./layout/navbar"; 17 | export * from "./landing/hero"; 18 | -------------------------------------------------------------------------------- /apps/extension/src/popup.tsx: -------------------------------------------------------------------------------- 1 | import { Button, Calendar } from "@acme/ui"; 2 | 3 | import "@acme/ui/dist/index.css"; 4 | 5 | import React from "react"; 6 | 7 | export default function NewTab() { 8 | const [date, setDate] = React.useState(new Date()); 9 | 10 | return ( 11 |
12 | 13 | 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /apps/mobile/e2e/starter.test.ts: -------------------------------------------------------------------------------- 1 | import { by, device, element, expect } from "detox"; 2 | 3 | describe("Onelove mobile app", () => { 4 | beforeAll(async () => { 5 | await device.launchApp(); 6 | }); 7 | 8 | beforeEach(async () => { 9 | await device.reloadReactNative(); 10 | }); 11 | 12 | it("should have welcome screen", async () => { 13 | await expect(element(by.id("welcome"))).toBeVisible(); 14 | }); 15 | 16 | it("should show hello world text", async () => { 17 | const el = element(by.id("welcome")); 18 | await expect(el).toHaveText("Hello World! 👋"); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /apps/api/src/accounts/accounts.service.spec.ts: -------------------------------------------------------------------------------- 1 | import type { TestingModule } from "@nestjs/testing"; 2 | import { Test } from "@nestjs/testing"; 3 | 4 | import { AccountsService } from "./accounts.service"; 5 | 6 | describe("AccountsService", () => { 7 | let service: AccountsService; 8 | 9 | beforeEach(async () => { 10 | const module: TestingModule = await Test.createTestingModule({ 11 | providers: [AccountsService], 12 | }).compile(); 13 | 14 | service = module.get(AccountsService); 15 | }); 16 | 17 | it("should be defined", () => { 18 | expect(service).toBeDefined(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /apps/api/src/ping/ping.controller.spec.ts: -------------------------------------------------------------------------------- 1 | import type { TestingModule } from "@nestjs/testing"; 2 | import { Test } from "@nestjs/testing"; 3 | 4 | import { PingController } from "./ping.controller"; 5 | 6 | describe("PingController", () => { 7 | let controller: PingController; 8 | 9 | beforeEach(async () => { 10 | const module: TestingModule = await Test.createTestingModule({ 11 | controllers: [PingController], 12 | }).compile(); 13 | 14 | controller = module.get(PingController); 15 | }); 16 | 17 | it("should be defined", () => { 18 | expect(controller).toBeDefined(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /apps/frontend/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/frontend/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import "./globals.css"; 2 | import "@acme/ui/dist/index.css"; 3 | 4 | import type { Metadata } from "next"; 5 | import { Inter } from "next/font/google"; 6 | 7 | const inter = Inter({ subsets: ["latin"] }); 8 | 9 | export const metadata: Metadata = { 10 | title: "Onelove", 11 | description: "Onelove is the only stack you will ever need", 12 | }; 13 | 14 | export default function RootLayout({ 15 | children, 16 | }: { 17 | children: React.ReactNode; 18 | }): JSX.Element { 19 | return ( 20 | 21 | {children} 22 | 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /apps/api/src/transactions/transactions.service.spec.ts: -------------------------------------------------------------------------------- 1 | import type { TestingModule } from "@nestjs/testing"; 2 | import { Test } from "@nestjs/testing"; 3 | 4 | import { TransactionsService } from "./transactions.service"; 5 | 6 | describe("TransactionsService", () => { 7 | let service: TransactionsService; 8 | 9 | beforeEach(async () => { 10 | const module: TestingModule = await Test.createTestingModule({ 11 | providers: [TransactionsService], 12 | }).compile(); 13 | 14 | service = module.get(TransactionsService); 15 | }); 16 | 17 | it("should be defined", () => { 18 | expect(service).toBeDefined(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended" 5 | ], 6 | "assignees": [ 7 | "suchcodemuchwow" 8 | ], 9 | "reviewers": [ 10 | "suchcodemuchwow" 11 | ], 12 | "packageRules": [ 13 | { 14 | "matchUpdateTypes": [ 15 | "minor", 16 | "patch", 17 | "pin", 18 | "digest" 19 | ], 20 | "matchCurrentVersion": "!/^0/", 21 | "automerge": true 22 | }, 23 | { 24 | "matchDepTypes": [ 25 | "devDependencies" 26 | ], 27 | "automerge": true 28 | } 29 | ], 30 | "platformAutomerge": true 31 | } 32 | -------------------------------------------------------------------------------- /tooling/typescript/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "compilerOptions": { 4 | "target": "ES2022", 5 | "module": "ESNext", 6 | "lib": ["dom", "dom.iterable", "ES2022"], 7 | "allowJs": true, 8 | "skipLibCheck": true, 9 | "strict": true, 10 | "noEmit": false, 11 | "esModuleInterop": true, 12 | "moduleResolution": "Bundler", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "moduleDetection": "force", 16 | "jsx": "preserve", 17 | "incremental": true, 18 | "noUncheckedIndexedAccess": true 19 | }, 20 | "exclude": ["node_modules", "build", "dist", ".next", ".expo"] 21 | } 22 | -------------------------------------------------------------------------------- /apps/api/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { CacheModule } from "@nestjs/cache-manager"; 2 | import { Module } from "@nestjs/common"; 3 | import { ConfigModule } from "@nestjs/config"; 4 | 5 | import { AccountsModule } from "./accounts/accounts.module"; 6 | import { PingModule } from "./ping/ping.module"; 7 | import { TransactionsModule } from "./transactions/transactions.module"; 8 | 9 | @Module({ 10 | imports: [ 11 | ConfigModule.forRoot({ isGlobal: true }), 12 | CacheModule.register({ isGlobal: true, ttl: 60 * 60 * 24 }), 13 | PingModule, 14 | TransactionsModule, 15 | AccountsModule, 16 | ], 17 | controllers: [], 18 | providers: [], 19 | }) 20 | export class AppModule {} 21 | -------------------------------------------------------------------------------- /apps/desktop/electron/electron-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare namespace NodeJS { 4 | interface ProcessEnv { 5 | /** 6 | * The built directory structure 7 | * 8 | * ```tree 9 | * ├─┬─┬ dist 10 | * │ │ └── index.html 11 | * │ │ 12 | * │ ├─┬ dist-electron 13 | * │ │ ├── main.js 14 | * │ │ └── preload.js 15 | * │ 16 | * ``` 17 | */ 18 | DIST: string; 19 | /** /dist/ or /public/ */ 20 | VITE_PUBLIC: string; 21 | } 22 | } 23 | 24 | // Used in Renderer process, expose in `preload.ts` 25 | interface Window { 26 | ipcRenderer: import("electron").IpcRenderer; 27 | } 28 | -------------------------------------------------------------------------------- /apps/frontend/e2e/example.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from "@playwright/test"; 2 | 3 | test("has title", async ({ page }) => { 4 | await page.goto("localhost:3000"); 5 | 6 | // Expect a title "to contain" a substring. 7 | await expect(page).toHaveTitle(/Onelove/); 8 | }); 9 | 10 | test("get started link", async ({ page }) => { 11 | await page.goto("localhost:3000"); 12 | 13 | const header = await page.getByText("Welcome to Onelove!"); 14 | const subHeader = await page.getByText( 15 | "Web 🛜 Mobile 📱 Desktop 🖥️ Browser Extensions 🔮 APIs 👮‍♂️ and Scraper 🕸️", 16 | ); 17 | 18 | await expect(header).toBeVisible(); 19 | await expect(subHeader).toBeVisible(); 20 | }); 21 | -------------------------------------------------------------------------------- /apps/mobile/jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('@jest/types').Config.InitialOptions} */ 2 | module.exports = { 3 | preset: "jest-expo", 4 | transformIgnorePatterns: [ 5 | "node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)", 6 | ], 7 | collectCoverage: true, 8 | collectCoverageFrom: [ 9 | "src/**/*.{js,jsx,ts,tsx}", 10 | "!**/*.test.{js,jsx,ts,tsx}", 11 | ], 12 | roots: ["/src"], 13 | moduleNameMapper: { 14 | "^@/(.*)$": "/src/$1", 15 | }, 16 | moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json"], 17 | }; 18 | -------------------------------------------------------------------------------- /tooling/eslint/react.js: -------------------------------------------------------------------------------- 1 | /** @type {import('eslint').Linter.Config} */ 2 | const config = { 3 | extends: [ 4 | "plugin:react/recommended", 5 | "plugin:react-hooks/recommended", 6 | "plugin:jsx-a11y/recommended", 7 | ], 8 | rules: { 9 | "react/prop-types": "off", 10 | "react/jsx-curly-brace-presence": [ 11 | "error", 12 | { 13 | props: "always", 14 | children: "ignore", 15 | propElementValues: "always", 16 | }, 17 | ], 18 | }, 19 | globals: { 20 | React: "writable", 21 | }, 22 | settings: { 23 | react: { 24 | version: "detect", 25 | }, 26 | }, 27 | env: { 28 | browser: true, 29 | }, 30 | }; 31 | 32 | module.exports = config; 33 | -------------------------------------------------------------------------------- /apps/desktop/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src", "electron"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /apps/api/src/accounts/accounts.controller.spec.ts: -------------------------------------------------------------------------------- 1 | import type { TestingModule } from "@nestjs/testing"; 2 | import { Test } from "@nestjs/testing"; 3 | 4 | import { AccountsController } from "./accounts.controller"; 5 | import { AccountsService } from "./accounts.service"; 6 | 7 | describe("AccountsController", () => { 8 | let controller: AccountsController; 9 | 10 | beforeEach(async () => { 11 | const module: TestingModule = await Test.createTestingModule({ 12 | controllers: [AccountsController], 13 | providers: [AccountsService], 14 | }).compile(); 15 | 16 | controller = module.get(AccountsController); 17 | }); 18 | 19 | it("should be defined", () => { 20 | expect(controller).toBeDefined(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /apps/api/src/transactions/dto/create-transaction.dto.ts: -------------------------------------------------------------------------------- 1 | import { ApiProperty } from "@nestjs/swagger"; 2 | import { IsDate, IsNumber, IsUUID } from "class-validator"; 3 | 4 | export class CreateTransactionDto { 5 | @IsUUID("all") 6 | @ApiProperty({ 7 | required: true, 8 | example: "cf479136-0a5b-42ad-a16c-26d9eda3b4aa", 9 | }) 10 | account_id: string; 11 | 12 | @IsNumber() 13 | @ApiProperty({ 14 | required: true, 15 | example: 100.5, 16 | }) 17 | amount: number; 18 | } 19 | 20 | export class CreateTransactionResponse extends CreateTransactionDto { 21 | @ApiProperty({ 22 | required: true, 23 | example: "cf479136-0a5b-42ad-a16c-26d9eda3b4aa", 24 | }) 25 | transaction_id: string; 26 | 27 | @IsDate() 28 | created_at: Date; 29 | } 30 | -------------------------------------------------------------------------------- /apps/api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2021", 4 | "module": "CommonJS", 5 | "declaration": true, 6 | "removeComments": true, 7 | "emitDecoratorMetadata": true, 8 | "experimentalDecorators": true, 9 | "allowSyntheticDefaultImports": true, 10 | "sourceMap": true, 11 | "outDir": "./build", 12 | "baseUrl": "./", 13 | "incremental": true, 14 | "skipLibCheck": true, 15 | "strictNullChecks": true, 16 | "noImplicitAny": true, 17 | "strictBindCallApply": true, 18 | "forceConsistentCasingInFileNames": true, 19 | "noFallthroughCasesInSwitch": true, 20 | "noImplicitReturns": false, 21 | "strictPropertyInitialization": false 22 | }, 23 | "include": ["**/*.js", "**/*.ts"], 24 | "exclude": ["node_modules", "build"] 25 | } 26 | -------------------------------------------------------------------------------- /apps/api/test/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import type { INestApplication } from "@nestjs/common"; 3 | import type { TestingModule } from "@nestjs/testing"; 4 | import { Test } from "@nestjs/testing"; 5 | import request from "supertest"; 6 | 7 | import { AppModule } from "./../src/app.module"; 8 | 9 | describe("AppController (e2e)", () => { 10 | let app: INestApplication; 11 | 12 | beforeEach(async () => { 13 | const moduleFixture: TestingModule = await Test.createTestingModule({ 14 | imports: [AppModule], 15 | }).compile(); 16 | 17 | app = moduleFixture.createNestApplication(); 18 | await app.init(); 19 | }); 20 | 21 | it("/ (GET)", () => { 22 | return request(app.getHttpServer()) 23 | .get("/") 24 | .expect(200) 25 | .expect("Hello World!"); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /.github/workflows/frontend-e2e.yml: -------------------------------------------------------------------------------- 1 | name: Frontend E2E tests 2 | on: 3 | push: 4 | branches: [ main, master ] 5 | paths: 6 | - 'apps/frontend/**' 7 | pull_request: 8 | branches: [ main, master ] 9 | paths: 10 | - 'apps/frontend/**' 11 | jobs: 12 | test-e2e: 13 | timeout-minutes: 60 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - name: Setup 18 | uses: ./tooling/github/setup 19 | - name: Install Playwright Browsers 20 | run: pnpm exec playwright install --with-deps 21 | - name: Run Playwright tests 22 | run: turbo test:e2e -F frontend 23 | - uses: actions/upload-artifact@v4 24 | if: always() 25 | with: 26 | name: playwright-report 27 | path: apps/frontend/playwright-report 28 | retention-days: 30 29 | -------------------------------------------------------------------------------- /apps/desktop/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | 4 | import { HeroHeader } from "@acme/ui/components/landing/hero"; 5 | 6 | import "@acme/ui/styles/globals.css"; 7 | import "@acme/ui/dist/index.css"; 8 | 9 | ReactDOM.createRoot(document.getElementById("root")!).render( 10 | 11 | 18 | , 19 | ); 20 | 21 | // Remove Preload scripts loading 22 | postMessage({ payload: "removeLoading" }, "*"); 23 | 24 | // Use contextBridge 25 | window.ipcRenderer.on("main-process-message", (_event, message) => { 26 | console.log(message); 27 | }); 28 | -------------------------------------------------------------------------------- /apps/scraper/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scraper", 3 | "version": "0.0.1", 4 | "private": "true", 5 | "type": "module", 6 | "scripts": { 7 | "build": "tsc", 8 | "clean": "rm -rf node_modules build storage .turbo", 9 | "dev": "tsx src/main.ts", 10 | "format": "prettier --check . --ignore-path ../../.gitignore", 11 | "lint": "eslint . --max-warnings 0", 12 | "start": "node build/main.js", 13 | "test": "echo \"Error: oops, the actor has no tests yet, sad!\"", 14 | "typecheck": "tsc --noEmit", 15 | "postinstall": "playwright install --with-deps" 16 | }, 17 | "prettier": "@acme/prettier-config", 18 | "eslintConfig": { 19 | "extends": [ 20 | "@acme/eslint-config/base" 21 | ], 22 | "root": true 23 | }, 24 | "dependencies": { 25 | "crawlee": "^3.0.0", 26 | "playwright": "1.43.1" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/ui/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import type { VariantProps } from "class-variance-authority"; 4 | import * as React from "react"; 5 | import * as LabelPrimitive from "@radix-ui/react-label"; 6 | import { cva } from "class-variance-authority"; 7 | 8 | import { cn } from "../../lib/utils"; 9 | 10 | const labelVariants = cva( 11 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", 12 | ); 13 | 14 | const Label = React.forwardRef< 15 | React.ElementRef, 16 | React.ComponentPropsWithoutRef & 17 | VariantProps 18 | >(({ className, ...props }, ref) => ( 19 | 24 | )); 25 | Label.displayName = LabelPrimitive.Root.displayName; 26 | 27 | export { Label }; 28 | -------------------------------------------------------------------------------- /apps/desktop/vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from "node:path"; 2 | import react from "@vitejs/plugin-react"; 3 | import { defineConfig } from "vite"; 4 | import electron from "vite-plugin-electron/simple"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [ 9 | react(), 10 | electron({ 11 | main: { 12 | // Shortcut of `build.lib.entry`. 13 | entry: "electron/main.ts", 14 | }, 15 | preload: { 16 | // Shortcut of `build.rollupOptions.input`. 17 | // Preload scripts may contain Web assets, so use the `build.rollupOptions.input` instead `build.lib.entry`. 18 | input: path.join(__dirname, "electron/preload.ts"), 19 | }, 20 | // Ployfill the Electron and Node.js built-in modules for Renderer process. 21 | // See 👉 https://github.com/electron-vite/vite-plugin-electron-renderer 22 | renderer: {}, 23 | }), 24 | ], 25 | }); 26 | -------------------------------------------------------------------------------- /apps/api/src/transactions/transactions.controller.spec.ts: -------------------------------------------------------------------------------- 1 | import type { TestingModule } from "@nestjs/testing"; 2 | import { CACHE_MANAGER } from "@nestjs/cache-manager"; 3 | import { Test } from "@nestjs/testing"; 4 | 5 | import { TransactionsController } from "./transactions.controller"; 6 | import { TransactionsService } from "./transactions.service"; 7 | 8 | describe("TransactionsController", () => { 9 | let controller: TransactionsController; 10 | 11 | beforeEach(async () => { 12 | const module: TestingModule = await Test.createTestingModule({ 13 | controllers: [TransactionsController], 14 | providers: [ 15 | TransactionsService, 16 | { provide: CACHE_MANAGER, useValue: {} }, 17 | ], 18 | }).compile(); 19 | 20 | controller = module.get(TransactionsController); 21 | }); 22 | 23 | it("should be defined", () => { 24 | expect(controller).toBeDefined(); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ui/components/ui/input.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "../../lib/utils"; 4 | 5 | export interface InputProps 6 | extends React.InputHTMLAttributes {} 7 | 8 | const Input = React.forwardRef( 9 | ({ className, type, ...props }, ref) => { 10 | return ( 11 | 20 | ); 21 | }, 22 | ); 23 | Input.displayName = "Input"; 24 | 25 | export { Input }; 26 | -------------------------------------------------------------------------------- /apps/desktop/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "desktop", 3 | "version": "0.0.1", 4 | "private": true, 5 | "description": "An electron app", 6 | "author": { 7 | "name": "Acme Inc.", 8 | "email": "suchcodemuchwow@gmail.com" 9 | }, 10 | "main": "dist-electron/main.js", 11 | "scripts": { 12 | "build": "tsc && vite build && electron-builder", 13 | "clean": "rm -rf node_modules .turbo dist dist-electron release", 14 | "dev": "vite", 15 | "format": "prettier --check . --ignore-path ../../.gitignore", 16 | "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", 17 | "preview": "vite preview", 18 | "typecheck": "tsc --noEmit" 19 | }, 20 | "prettier": "@acme/prettier-config", 21 | "eslintConfig": { 22 | "extends": [ 23 | "@acme/eslint-config/base", 24 | "@acme/eslint-config/react" 25 | ], 26 | "root": true 27 | }, 28 | "dependencies": { 29 | "@acme/ui": "workspace:*", 30 | "react": "^18.2.0", 31 | "react-dom": "^18.2.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tooling/prettier/index.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath } from "url"; 2 | 3 | /** @typedef {import("prettier").Config} PrettierConfig */ 4 | /** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */ 5 | /** @typedef {import("@ianvs/prettier-plugin-sort-imports").PluginConfig} SortImportsConfig */ 6 | 7 | /** @type { PrettierConfig | SortImportsConfig | TailwindConfig } */ 8 | const config = { 9 | plugins: [ 10 | "@ianvs/prettier-plugin-sort-imports", 11 | "prettier-plugin-tailwindcss", 12 | ], 13 | importOrder: [ 14 | "", 15 | "^(react/(.*)$)|^(react$)|^(react-native(.*)$)", 16 | "^(next/(.*)$)|^(next$)", 17 | "^(expo(.*)$)|^(expo$)", 18 | "", 19 | "", 20 | "^@acme", 21 | "^@acme/(.*)$", 22 | "", 23 | "^[.|..|~]", 24 | "^~/", 25 | "^[../]", 26 | "^[./]", 27 | ], 28 | importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"], 29 | importOrderTypeScriptVersion: "4.4.0", 30 | }; 31 | 32 | export default config; 33 | -------------------------------------------------------------------------------- /apps/scraper/src/main.ts: -------------------------------------------------------------------------------- 1 | // For more information, see https://crawlee.dev/ 2 | import { PlaywrightCrawler } from "crawlee"; 3 | 4 | // PlaywrightCrawler crawls the web using a headless 5 | // browser controlled by the Playwright library. 6 | const crawler = new PlaywrightCrawler({ 7 | // Use the requestHandler to process each of the crawled pages. 8 | requestHandler: async (ctx) => { 9 | const { request, page } = ctx; 10 | const title = await page.title(); 11 | 12 | ctx.log.info(`Title of ${request.loadedUrl} is '${title}'`); 13 | 14 | await ctx.pushData({ title, url: request.loadedUrl }); 15 | 16 | // Extract links from the current page 17 | // and add them to the crawling queue. 18 | await ctx.enqueueLinks(); 19 | }, 20 | // Comment this option to scrape the full website. 21 | maxRequestsPerCrawl: 20, 22 | // Uncomment this option to see the browser window. 23 | // headless: false, 24 | }); 25 | 26 | // Add first URL to the queue and start the crawl. 27 | await crawler.run(["https://suchcodemuchwow.vercel.app"]); 28 | -------------------------------------------------------------------------------- /apps/api/src/transactions/transactions.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from "@nestjs/common"; 2 | 3 | import type { 4 | CreateTransactionDto, 5 | CreateTransactionResponse, 6 | } from "./dto/create-transaction.dto"; 7 | 8 | @Injectable() 9 | export class TransactionsService { 10 | create( 11 | createTransactionDto: CreateTransactionDto, 12 | ): CreateTransactionResponse { 13 | return { 14 | account_id: createTransactionDto.account_id, 15 | created_at: new Date(), 16 | transaction_id: "1", 17 | amount: 100, 18 | }; 19 | } 20 | 21 | findOne(): Promise { 22 | return Promise.resolve({ 23 | account_id: "1", 24 | created_at: new Date(), 25 | transaction_id: "1", 26 | amount: 100, 27 | }); 28 | } 29 | 30 | findAll(): Promise { 31 | return Promise.resolve([ 32 | { 33 | account_id: "1", 34 | created_at: new Date(), 35 | transaction_id: "1", 36 | amount: 100, 37 | }, 38 | ]); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /apps/mobile/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "android": { 4 | "adaptiveIcon": { 5 | "backgroundColor": "#FFFFFF", 6 | "foregroundImage": "./assets/adaptive-icon.png" 7 | }, 8 | "package": "com.suchcodemuchwow.onelove" 9 | }, 10 | "assetBundlePatterns": ["**/*"], 11 | "icon": "./assets/icon.png", 12 | "ios": { 13 | "buildNumber": "1.0.0", 14 | "bundleIdentifier": "com.suchcodemuchwow.onelove", 15 | "supportsTablet": true 16 | }, 17 | "name": "onelove", 18 | "orientation": "portrait", 19 | "plugins": ["@config-plugins/detox"], 20 | "slug": "onelove", 21 | "splash": { 22 | "backgroundColor": "#ffffff", 23 | "image": "./assets/splash.png", 24 | "resizeMode": "contain" 25 | }, 26 | "updates": { 27 | "fallbackToCacheTimeout": 0 28 | }, 29 | "version": "1.0.0", 30 | "web": { 31 | "favicon": "./assets/favicon.png" 32 | }, 33 | "extra": { 34 | "eas": { 35 | "projectId": "28d37b65-ced0-4794-a854-5d5926c3de2b" 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # Dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # Local env files 9 | .env 10 | .env*.local 11 | 12 | # Testing 13 | coverage 14 | 15 | # Turbo 16 | .turbo 17 | 18 | # Vercel 19 | .vercel 20 | 21 | # Build Outputs 22 | .next/ 23 | out/ 24 | dist 25 | .plasmo 26 | next-env.d.ts 27 | 28 | # Debug 29 | npm-debug.log* 30 | yarn-debug.log* 31 | yarn-error.log* 32 | .pnpm-debug.log* 33 | lerna-debug.log* 34 | 35 | # Misc 36 | .DS_Store 37 | *.pem 38 | 39 | # IDE 40 | .idea 41 | .vscode 42 | !.vscode/extensions.json 43 | 44 | # Storage 45 | apify_storage 46 | crawlee_storage 47 | storage 48 | 49 | # Expo 50 | .expo/ 51 | dist/ 52 | apps/expo/.gitignore 53 | 54 | # Production 55 | build 56 | ios 57 | android 58 | 59 | # TypeScript 60 | *.tsbuildinfo 61 | 62 | # Logs 63 | logs 64 | *.log 65 | 66 | # Editor directories and files 67 | .suo 68 | *.ntvs* 69 | *.njsproj 70 | *.sln 71 | *.sw? 72 | apps/desktop/dist-electron/* 73 | apps/desktop/release/* 74 | apps/mobile/artifacts/* 75 | 76 | # Test Coverage 77 | playwright-report -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2023-2024 suchcodemuchwow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /apps/frontend/public/circles.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /apps/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "build": "next build", 7 | "build:e2e": "next build", 8 | "clean": "rm -rf node_modules .turbo .next", 9 | "dev": "next dev", 10 | "format": "prettier --check . --ignore-path ../../.gitignore", 11 | "lint": "eslint . --max-warnings 0", 12 | "start": "next start", 13 | "test:e2e": "../../node_modules/.bin/playwright test", 14 | "typecheck": "tsc --noEmit" 15 | }, 16 | "prettier": "@acme/prettier-config", 17 | "eslintConfig": { 18 | "extends": [ 19 | "@acme/eslint-config/base", 20 | "@acme/eslint-config/nextjs", 21 | "@acme/eslint-config/react" 22 | ], 23 | "root": true 24 | }, 25 | "eslintIgnore": [ 26 | ".next", 27 | "node_modules", 28 | "next-env.d.ts", 29 | "playwright.config.ts", 30 | "e2e" 31 | ], 32 | "dependencies": { 33 | "@acme/ui": "workspace:*", 34 | "next": "^14.0.3", 35 | "react": "^18.2.0", 36 | "react-dom": "^18.2.0" 37 | }, 38 | "devDependencies": { 39 | "@playwright/test": "^1.40.1", 40 | "@types/node": "^20.3.1" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /apps/api/src/transactions/transactions.controller.ts: -------------------------------------------------------------------------------- 1 | import { CacheInterceptor } from "@nestjs/cache-manager"; 2 | import { 3 | Body, 4 | Controller, 5 | Get, 6 | Param, 7 | ParseUUIDPipe, 8 | Post, 9 | UseInterceptors, 10 | } from "@nestjs/common"; 11 | 12 | import { 13 | CreateTransactionDto, 14 | CreateTransactionResponse, 15 | } from "./dto/create-transaction.dto"; 16 | import { TransactionsService } from "./transactions.service"; 17 | 18 | @UseInterceptors(CacheInterceptor) 19 | @Controller("transactions") 20 | export class TransactionsController { 21 | constructor(private readonly transactionsService: TransactionsService) {} 22 | 23 | @Post() 24 | create( 25 | @Body() createTransactionDto: CreateTransactionDto, 26 | ): CreateTransactionResponse { 27 | return this.transactionsService.create(createTransactionDto); 28 | } 29 | 30 | @Get() 31 | findAll() { 32 | return this.transactionsService.findAll(); 33 | } 34 | 35 | @Get(":transaction_id") 36 | findOne( 37 | @Param("transaction_id", new ParseUUIDPipe({ version: "4" })) id: string, 38 | ) { 39 | console.log(id); 40 | return this.transactionsService.findOne(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /apps/desktop/electron-builder.json5: -------------------------------------------------------------------------------- 1 | /** 2 | * @see https://www.electron.build/configuration/configuration 3 | */ 4 | { 5 | $schema: "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json", 6 | appId: "com.suchcodemuchwow.onelove", 7 | asar: true, 8 | productName: "Onelove", 9 | directories: { 10 | output: "release/${version}", 11 | buildResources: "src/assets", 12 | }, 13 | electronVersion: "26.6.3", 14 | files: ["dist", "dist-electron", "public", "src/assets/**/*"], 15 | mac: { 16 | target: ["dmg"], 17 | artifactName: "${productName}-Mac-${version}-Installer.${ext}", 18 | icon: "icon.png", 19 | }, 20 | win: { 21 | target: [ 22 | { 23 | target: "nsis", 24 | arch: ["x64"], 25 | }, 26 | ], 27 | artifactName: "${productName}-Windows-${version}-Setup.${ext}", 28 | }, 29 | nsis: { 30 | oneClick: false, 31 | perMachine: false, 32 | allowToChangeInstallationDirectory: true, 33 | deleteAppDataOnUninstall: false, 34 | }, 35 | linux: { 36 | target: ["AppImage"], 37 | artifactName: "${productName}-Linux-${version}.${ext}", 38 | }, 39 | } 40 | -------------------------------------------------------------------------------- /apps/extension/src/style.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer base { 6 | :host { 7 | --background: 0 0% 100%; 8 | --foreground: 222.2 84% 4.9%; 9 | 10 | --muted: 210 40% 96.1%; 11 | --muted-foreground: 215.4 16.3% 46.9%; 12 | 13 | --popover: 0 0% 100%; 14 | --popover-foreground: 222.2 84% 4.9%; 15 | 16 | --card: 0 0% 100%; 17 | --card-foreground: 222.2 84% 4.9%; 18 | 19 | --border: 214.3 31.8% 91.4%; 20 | --input: 214.3 31.8% 91.4%; 21 | 22 | --primary: 222.2 47.4% 11.2%; 23 | --primary-foreground: 210 40% 98%; 24 | 25 | --secondary: 210 40% 96.1%; 26 | --secondary-foreground: 222.2 47.4% 11.2%; 27 | 28 | --accent: 210 40% 96.1%; 29 | --accent-foreground: ; 30 | 31 | --destructive: 0 84.2% 60.2%; 32 | --destructive-foreground: 210 40% 98%; 33 | 34 | --ring: 215 20.2% 65.1%; 35 | 36 | --radius: 0.5rem; 37 | } 38 | 39 | #plasmo-shadow-container { 40 | z-index: 99999; 41 | top: 20px; 42 | left: 20px; 43 | position: absolute !important; 44 | } 45 | 46 | #plasmo-inline { 47 | background: blue; 48 | } 49 | } 50 | 51 | @layer base { 52 | } 53 | -------------------------------------------------------------------------------- /apps/mobile/metro.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('expo/metro-config').MetroConfig} */ 2 | const { FileStore } = require("metro-cache"); 3 | const path = require("path"); 4 | 5 | const { getDefaultConfig } = require("expo/metro-config"); 6 | 7 | const projectRoot = __dirname; 8 | 9 | const config = getDefaultConfig(projectRoot, { 10 | // Enable CSS support. 11 | isCSSEnabled: true, 12 | }); 13 | 14 | const workspaceRoot = path.resolve(projectRoot, "../.."); 15 | 16 | // #1 - Watch all files in the monorepo 17 | config.watchFolders = [workspaceRoot]; 18 | // #3 - Force resolving nested modules to the folders below 19 | config.resolver.disableHierarchicalLookup = true; 20 | // #2 - Try resolving with project modules first, then workspace modules 21 | config.resolver.nodeModulesPaths = [ 22 | path.resolve(projectRoot, "node_modules"), 23 | path.resolve(workspaceRoot, "node_modules"), 24 | ]; 25 | 26 | config.resolver.sourceExts = ["jsx", "js", "ts", "tsx", "cjs", "mjs", "json"]; 27 | 28 | // Use turborepo to restore the cache when possible 29 | config.cacheStores = [ 30 | new FileStore({ 31 | root: path.join(projectRoot, "node_modules", ".cache", "metro"), 32 | }), 33 | ]; 34 | 35 | module.exports = config; 36 | -------------------------------------------------------------------------------- /apps/extension/src/contents/google-sidebar.tsx: -------------------------------------------------------------------------------- 1 | import type { PlasmoCSConfig } from "plasmo"; 2 | import shadcnCssText from "data-text:../style.css"; 3 | 4 | import { Button, Popover, PopoverContent, PopoverTrigger } from "@acme/ui"; 5 | 6 | export const config: PlasmoCSConfig = { 7 | all_frames: true, 8 | matches: ["https://www.google.com/*"], 9 | }; 10 | 11 | export const getStyle = () => { 12 | const style = document.createElement("style"); 13 | style.textContent = shadcnCssText; 14 | return style; 15 | }; 16 | 17 | const GoogleSidebar = () => { 18 | const container = document.getElementById("plasmo-shadow-container"); 19 | 20 | return ( 21 | 22 | 23 | 26 | 27 | 28 |
29 |
30 |

Onelove

31 |
32 |
33 |
34 |
35 | ); 36 | }; 37 | 38 | export default GoogleSidebar; 39 | -------------------------------------------------------------------------------- /packages/ui/components/ui/checkbox.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; 5 | import { Check } from "lucide-react"; 6 | 7 | import { cn } from "../../lib/utils"; 8 | 9 | const Checkbox = React.forwardRef< 10 | React.ElementRef, 11 | React.ComponentPropsWithoutRef 12 | >(({ className, ...props }, ref) => ( 13 | 21 | 24 | 25 | 26 | 27 | )); 28 | Checkbox.displayName = CheckboxPrimitive.Root.displayName; 29 | 30 | export { Checkbox }; 31 | -------------------------------------------------------------------------------- /apps/mobile/eas.json: -------------------------------------------------------------------------------- 1 | { 2 | "cli": { 3 | "promptToConfigurePushNotifications": false 4 | }, 5 | "build": { 6 | "base": { 7 | "node": "18.15.0", 8 | "android": { 9 | "image": "ubuntu-22.04-jdk-11-ndk-r21e" 10 | }, 11 | "ios": { 12 | "resourceClass": "m1-medium" 13 | }, 14 | "env": { 15 | "API_URL": "https://api.example.com" 16 | } 17 | }, 18 | "development": { 19 | "extends": "base", 20 | "channel": "development", 21 | "distribution": "internal", 22 | "android": { 23 | "buildType": "apk" 24 | }, 25 | "ios": { 26 | "resourceClass": "m1-medium" 27 | } 28 | }, 29 | "production": { 30 | "extends": "base", 31 | "channel": "production", 32 | "distribution": "store", 33 | "android": { 34 | "buildType": "app-bundle" 35 | }, 36 | "ios": { 37 | "resourceClass": "m1-medium" 38 | } 39 | }, 40 | "test": { 41 | "android": { 42 | "gradleCommand": ":app:assembleRelease :app:assembleAndroidTest -DtestBuildType=release", 43 | "withoutCredentials": true 44 | }, 45 | "ios": { 46 | "simulator": true 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /apps/extension/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extension", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "build": "plasmo build", 7 | "clean": "rm -rf node_modules build .plasmo .turbo", 8 | "dev": "plasmo dev", 9 | "format": "prettier --check . --ignore-path ../../.gitignore", 10 | "lint": "eslint . --max-warnings 0", 11 | "package": "plasmo package", 12 | "with-env": "dotenv -e ../../.env", 13 | "typecheck": "tsc --noEmit" 14 | }, 15 | "prettier": "@acme/prettier-config", 16 | "eslintConfig": { 17 | "extends": [ 18 | "@acme/eslint-config/base", 19 | "@acme/eslint-config/react" 20 | ], 21 | "rules": { 22 | "react/jsx-key": "off", 23 | "react/no-unknown-property": "off", 24 | "@next/next/no-html-link-for-pages": "off" 25 | }, 26 | "root": true 27 | }, 28 | "dependencies": { 29 | "@acme/ui": "workspace:*", 30 | "@plasmohq/messaging": "^0.6.0", 31 | "lucide-react": "^0.368.0", 32 | "plasmo": "0.85.2", 33 | "react": "18.2.0", 34 | "react-dom": "18.2.0", 35 | "react-router-dom": "^6.10.0" 36 | }, 37 | "manifest": { 38 | "host_permissions": [ 39 | "https://*/*" 40 | ], 41 | "permissions": [ 42 | "tabs", 43 | "scripting" 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /apps/frontend/public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tooling/eslint/base.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | const config = { 3 | extends: [ 4 | "turbo", 5 | "eslint:recommended", 6 | "plugin:@typescript-eslint/recommended-type-checked", 7 | "plugin:@typescript-eslint/stylistic-type-checked", 8 | "prettier", 9 | ], 10 | env: { 11 | es2022: true, 12 | node: true, 13 | }, 14 | parser: "@typescript-eslint/parser", 15 | parserOptions: { 16 | project: true, 17 | }, 18 | plugins: ["@typescript-eslint", "import"], 19 | rules: { 20 | "turbo/no-undeclared-env-vars": "off", 21 | "@typescript-eslint/no-unused-vars": [ 22 | "error", 23 | { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, 24 | ], 25 | "@typescript-eslint/consistent-type-imports": [ 26 | "warn", 27 | { prefer: "type-imports", fixStyle: "separate-type-imports" }, 28 | ], 29 | "@typescript-eslint/no-misused-promises": [ 30 | 2, 31 | { checksVoidReturn: { attributes: false } }, 32 | ], 33 | "import/consistent-type-specifier-style": ["error", "prefer-top-level"], 34 | }, 35 | ignorePatterns: [ 36 | "**/.eslintrc.cjs", 37 | "**/*.config.js", 38 | "**/*.config.cjs", 39 | ".next", 40 | "dist", 41 | "build", 42 | "pnpm-lock.yaml", 43 | ], 44 | reportUnusedDisableDirectives: true, 45 | }; 46 | 47 | module.exports = config; 48 | -------------------------------------------------------------------------------- /packages/ui/components/auth/page.tsx: -------------------------------------------------------------------------------- 1 | import { AuthenticationForm } from "./form"; 2 | 3 | export function AuthenticationPage() { 4 | return ( 5 |
8 |
13 |
14 |

15 | Create an account 16 |

17 |

18 | Enter your email below to create your account 19 |

20 |
21 | 22 |

23 | By clicking continue, you agree to our{" "} 24 | 28 | Terms of Service 29 | {" "} 30 | and{" "} 31 | 35 | Privacy Policy 36 | 37 | . 38 |

39 |
40 |
41 | ); 42 | } 43 | -------------------------------------------------------------------------------- /apps/frontend/app/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | 5 | import type { Social } from "@acme/ui"; 6 | import { HeroHeader, Navbar } from "@acme/ui"; 7 | 8 | const header = { 9 | title: "Welcome to Onelove!", 10 | subtitle: 11 | "Web 🛜 Mobile 📱 Desktop 🖥️ Browser Extensions 🔮 APIs 👮‍♂️ and Scraper 🕸️", 12 | image: "sloth.png", 13 | }; 14 | 15 | const site = { 16 | name: "Onelove", 17 | author: "suchcodemuchwow", 18 | navLinks: [ 19 | { 20 | route: "Home", 21 | path: "/", 22 | }, 23 | ], 24 | }; 25 | 26 | const social: Social[] = [ 27 | { 28 | href: "https://www.github.com/suchcodemuchwow/onelove", 29 | platform: "github", 30 | }, 31 | { 32 | href: "https://www.twitter.com/suchcodemuchwow", 33 | platform: "twitter", 34 | }, 35 | { 36 | href: "https://www.instagram.com/suchcodemuchwow", 37 | platform: "instagram", 38 | }, 39 | { 40 | href: "https://www.linkedin.com/in/suchcodemuchwow", 41 | platform: "linkedin", 42 | }, 43 | ]; 44 | 45 | export default function Page() { 46 | return ( 47 |
48 | 49 | 55 |
56 | ); 57 | } 58 | -------------------------------------------------------------------------------- /apps/frontend/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | First, run the development server: 4 | 5 | ```bash 6 | yarn dev 7 | ``` 8 | 9 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 10 | 11 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 12 | 13 | To create [API routes](https://nextjs.org/docs/app/building-your-application/routing/router-handlers) add an `api/` directory to the `app/` directory with a `route.ts` file. For individual endpoints, create a subfolder in the `api` directory, like `api/hello/route.ts` would map to [http://localhost:3000/api/hello](http://localhost:3000/api/hello). 14 | 15 | ## Learn More 16 | 17 | To learn more about Next.js, take a look at the following resources: 18 | 19 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 20 | - [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial. 21 | 22 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 23 | 24 | ## Deploy on Vercel 25 | 26 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js. 27 | 28 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 29 | -------------------------------------------------------------------------------- /packages/ui/components/ui/popover.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import type { PopoverPortalProps } from "@radix-ui/react-popover"; 4 | import * as React from "react"; 5 | import * as PopoverPrimitive from "@radix-ui/react-popover"; 6 | 7 | import { cn } from "../../lib/utils"; 8 | 9 | const Popover = PopoverPrimitive.Root; 10 | 11 | const PopoverTrigger = PopoverPrimitive.Trigger; 12 | 13 | const PopoverContent = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | PopoverPortalProps 17 | >( 18 | ( 19 | { className, align = "center", container, sideOffset = 4, ...props }, 20 | ref, 21 | ) => ( 22 | 32 | ), 33 | ); 34 | PopoverContent.displayName = PopoverPrimitive.Content.displayName; 35 | 36 | export { Popover, PopoverTrigger, PopoverContent }; 37 | -------------------------------------------------------------------------------- /apps/api/src/main.ts: -------------------------------------------------------------------------------- 1 | import type { NestExpressApplication } from "@nestjs/platform-express"; 2 | import { ValidationPipe } from "@nestjs/common"; 3 | import { ConfigService } from "@nestjs/config"; 4 | import { NestFactory } from "@nestjs/core"; 5 | import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger"; 6 | 7 | import { AppModule } from "./app.module"; 8 | 9 | async function bootstrap() { 10 | const app = await NestFactory.create(AppModule); 11 | const configService = app.get(ConfigService); 12 | 13 | const apiBaseUrl = configService.get( 14 | "API_BASE_URL", 15 | "http://localhost:3001", 16 | ); 17 | const apiPort = configService.get("API_PORT", 3001); 18 | const apiPrefix = configService.get("API_PREFIX", "api"); 19 | const apiDocsPath = configService.get("API_DOCS_PATH", "docs"); 20 | 21 | app.setGlobalPrefix(apiPrefix); 22 | app.useGlobalPipes(new ValidationPipe()); 23 | app.enableCors({ credentials: true, origin: true }); 24 | 25 | const swaggerConfig = new DocumentBuilder() 26 | .addServer(apiBaseUrl) 27 | .setTitle(`Accounting API`) 28 | .setVersion("0.0.1") 29 | .build(); 30 | 31 | const document = SwaggerModule.createDocument(app, swaggerConfig); 32 | SwaggerModule.setup(apiDocsPath, app, document); 33 | 34 | await app.listen(Number(apiPort)); 35 | } 36 | 37 | bootstrap().catch((error) => { 38 | console.error("Error during application startup:", error); 39 | }); 40 | -------------------------------------------------------------------------------- /packages/ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@acme/ui", 3 | "version": "0.0.1", 4 | "license": "MIT", 5 | "main": "./components/index.ts", 6 | "scripts": { 7 | "build": "tailwindcss -i ./styles/globals.css -o dist/index.css", 8 | "build:watch": "tailwindcss -i ./styles/globals.css -o dist/index.css --watch", 9 | "clean": "rm -rf node_modules build dist .turbo", 10 | "format": "prettier --check . --ignore-path ../../.gitignore", 11 | "lint": "eslint . --max-warnings 0", 12 | "typecheck": "tsc --noEmit" 13 | }, 14 | "prettier": "@acme/prettier-config", 15 | "eslintConfig": { 16 | "env": { 17 | "amd": true, 18 | "browser": true, 19 | "node": true 20 | }, 21 | "extends": [ 22 | "@acme/eslint-config/base", 23 | "@acme/eslint-config/react" 24 | ], 25 | "rules": { 26 | "@typescript-eslint/no-empty-interface": "off", 27 | "@typescript-eslint/no-unsafe-assignment": "off", 28 | "react/jsx-key": "off", 29 | "react/no-unknown-property": "off", 30 | "@next/next/no-html-link-for-pages": "off" 31 | }, 32 | "root": true 33 | }, 34 | "eslintIgnore": [ 35 | "components/ui" 36 | ], 37 | "dependencies": { 38 | "@radix-ui/react-checkbox": "^1.0.4", 39 | "@radix-ui/react-dropdown-menu": "^2.0.6", 40 | "@radix-ui/react-label": "^2.0.2", 41 | "@radix-ui/react-popover": "^1.0.7", 42 | "@radix-ui/react-slot": "^1.0.2", 43 | "class-variance-authority": "^0.7.0", 44 | "clsx": "^2.0.0", 45 | "date-fns": "^3.0.6", 46 | "lucide-react": "^0.368.0", 47 | "react": "^18.2.0", 48 | "react-day-picker": "^8.9.1", 49 | "react-dom": "^18.2.0", 50 | "tailwind-merge": "^2.2.0" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /packages/ui/components/layout/footer.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | 3 | export interface FooterProps { 4 | author: string; 5 | siteName: string; 6 | navLinks: { 7 | route: string; 8 | path: string; 9 | }[]; 10 | } 11 | 12 | export function Footer(props: FooterProps) { 13 | return ( 14 |
15 |
16 |
17 | 18 |

19 | {props.siteName} 20 |

21 | 22 |
    27 | {props.navLinks.map((link) => ( 28 |
  • 29 | 33 | {link.route} 34 | 35 |
  • 36 | ))} 37 |
38 |
39 |
40 | 41 | © {new Date().getFullYear()}{" "} 42 | 48 | {props.author} 49 | 50 | . All Rights Reserved. 51 | 52 |
53 |
54 | ); 55 | } 56 | -------------------------------------------------------------------------------- /packages/ui/styles/globals.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss/base"; 2 | @import "tailwindcss/components"; 3 | @import "tailwindcss/utilities"; 4 | 5 | @layer base { 6 | :root { 7 | --background: 0 0% 100%; 8 | --foreground: 222.2 84% 4.9%; 9 | 10 | --muted: 210 40% 96.1%; 11 | --muted-foreground: 215.4 16.3% 46.9%; 12 | 13 | --popover: 0 0% 100%; 14 | --popover-foreground: 222.2 84% 4.9%; 15 | 16 | --card: 0 0% 100%; 17 | --card-foreground: 222.2 84% 4.9%; 18 | 19 | --border: 214.3 31.8% 91.4%; 20 | --input: 214.3 31.8% 91.4%; 21 | 22 | --primary: 222.2 47.4% 11.2%; 23 | --primary-foreground: 210 40% 98%; 24 | 25 | --secondary: 210 40% 96.1%; 26 | --secondary-foreground: 222.2 47.4% 11.2%; 27 | 28 | --accent: 210 40% 96.1%; 29 | --accent-foreground: ; 30 | 31 | --destructive: 0 84.2% 60.2%; 32 | --destructive-foreground: 210 40% 98%; 33 | 34 | --ring: 215 20.2% 65.1%; 35 | 36 | --radius: 0.5rem; 37 | } 38 | 39 | .dark { 40 | --background: 222.2 84% 4.9%; 41 | --foreground: 210 40% 98%; 42 | 43 | --muted: 217.2 32.6% 17.5%; 44 | --muted-foreground: 215 20.2% 65.1%; 45 | 46 | --popover: 222.2 84% 4.9%; 47 | --popover-foreground: 210 40% 98%; 48 | 49 | --card: 222.2 84% 4.9%; 50 | --card-foreground: 210 40% 98%; 51 | 52 | --border: 217.2 32.6% 17.5%; 53 | --input: 217.2 32.6% 17.5%; 54 | 55 | --primary: 210 40% 98%; 56 | --primary-foreground: 222.2 47.4% 11.2%; 57 | 58 | --secondary: 217.2 32.6% 17.5%; 59 | --secondary-foreground: 210 40% 98%; 60 | 61 | --accent: 217.2 32.6% 17.5%; 62 | --accent-foreground: ; 63 | 64 | --destructive: 0 62.8% 30.6%; 65 | --destructive-foreground: 0 85.7% 97.3%; 66 | 67 | --ring: 217.2 32.6% 17.5%; 68 | } 69 | } 70 | 71 | @layer base { 72 | } 73 | -------------------------------------------------------------------------------- /.github/workflows/pull-request.yaml: -------------------------------------------------------------------------------- 1 | name: Pull Request 2 | 3 | on: 4 | pull_request: 5 | branches: ["*"] 6 | push: 7 | branches: ["main"] 8 | 9 | concurrency: 10 | group: ${{ github.workflow }}-${{ github.ref }} 11 | cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} 12 | 13 | # You can leverage Vercel Remote Caching with Turbo to speed up your builds 14 | # @link https://turborepo.org/docs/core-concepts/remote-caching#remote-caching-on-vercel-builds 15 | env: 16 | FORCE_COLOR: 3 17 | TURBO_TEAM: ${{ vars.TURBO_TEAM }} 18 | TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} 19 | 20 | jobs: 21 | lint: 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/checkout@v4 25 | 26 | - name: Setup 27 | uses: ./tooling/github/setup 28 | 29 | - name: Copy env 30 | shell: bash 31 | run: cp .env.example .env 32 | 33 | - name: Lint 34 | run: pnpm lint 35 | 36 | format: 37 | runs-on: ubuntu-latest 38 | steps: 39 | - uses: actions/checkout@v4 40 | 41 | - name: Setup 42 | uses: ./tooling/github/setup 43 | 44 | - name: Format 45 | run: pnpm format 46 | 47 | typecheck: 48 | runs-on: ubuntu-latest 49 | steps: 50 | - uses: actions/checkout@v4 51 | 52 | - name: Setup 53 | uses: ./tooling/github/setup 54 | 55 | - name: Typecheck 56 | run: pnpm typecheck 57 | 58 | test: 59 | runs-on: ubuntu-latest 60 | steps: 61 | - uses: actions/checkout@v4 62 | 63 | - name: Setup 64 | uses: ./tooling/github/setup 65 | 66 | - name: Test 67 | run: pnpm test 68 | 69 | build: 70 | runs-on: ubuntu-latest 71 | steps: 72 | - uses: actions/checkout@v4 73 | 74 | - name: Setup 75 | uses: ./tooling/github/setup 76 | 77 | - name: Build 78 | run: pnpm build -------------------------------------------------------------------------------- /packages/ui/components/landing/hero.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from "../ui/button"; 2 | import { Icons } from "../ui/icons"; 3 | 4 | export interface Social { 5 | href: string; 6 | platform: "github" | "twitter" | "linkedin" | "instagram"; 7 | } 8 | 9 | interface HeroHeaderProps { 10 | header: string; 11 | subheader: string; 12 | image: string; 13 | social?: Social[]; 14 | } 15 | 16 | const IMG_SIZE = 150; 17 | 18 | export function HeroHeader(props: HeroHeaderProps) { 19 | const { header, subheader, image } = props; 20 | 21 | return ( 22 |
23 |
24 | {"logo"} 25 |
26 |
27 |

{header}

28 |

29 | {subheader} 30 |

31 |
32 |
33 |
34 | {props.social && ( 35 |
36 | Follow me on social media: 37 |
38 | {props.social.map((s) => { 39 | return ( 40 | s && ( 41 | 50 | ) 51 | ); 52 | })} 53 |
54 |
55 | )} 56 |
57 | ); 58 | } 59 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "globalDependencies": [ 4 | "**/.env" 5 | ], 6 | "globalEnv": [ 7 | "PLASMO_PUBLIC_DEV_PORT" 8 | ], 9 | "pipeline": { 10 | "dev": { 11 | "cache": false, 12 | "persistent": true 13 | }, 14 | "build": { 15 | "dependsOn": [ 16 | "^build" 17 | ], 18 | "outputs": [ 19 | ".next/**", 20 | "!.next/cache/**", 21 | "build/**", 22 | "dist/**", 23 | "node_modules/.cache/metro/**", 24 | "next-env.d.ts", 25 | ".expo/**", 26 | ".output/**", 27 | ".vercel/output/**" 28 | ] 29 | }, 30 | "build:e2e": {}, 31 | "desktop#dev": { 32 | "dependsOn": [ 33 | "@acme/ui#build" 34 | ], 35 | "cache": true 36 | }, 37 | "desktop#build:e2e": { 38 | "dependsOn": [ 39 | "@acme/ui#build" 40 | ], 41 | "cache": true 42 | }, 43 | "frontend#dev": { 44 | "dependsOn": [ 45 | "@acme/ui#build" 46 | ], 47 | "cache": true 48 | }, 49 | "frontend#build:e2e": { 50 | "dependsOn": [ 51 | "@acme/ui#build" 52 | ], 53 | "cache": true 54 | }, 55 | "mobile#test:e2e": { 56 | "cache": false, 57 | "dependsOn": [ 58 | "mobile#build:e2e" 59 | ] 60 | }, 61 | "test:e2e": { 62 | "cache": false, 63 | "dependsOn": [ 64 | "build:e2e" 65 | ] 66 | }, 67 | "clean": { 68 | "cache": false, 69 | "dependsOn": [ 70 | "^clean" 71 | ] 72 | }, 73 | "format": { 74 | "dependsOn": [ 75 | "^format" 76 | ], 77 | "outputs": [ 78 | "node_modules/.cache/.prettiercache" 79 | ], 80 | "outputMode": "new-only" 81 | }, 82 | "lint": { 83 | "dependsOn": [ 84 | "^lint" 85 | ] 86 | }, 87 | "test": { 88 | "dependsOn": [ 89 | "^test" 90 | ] 91 | }, 92 | "typecheck": { 93 | "dependsOn": [ 94 | "^typecheck" 95 | ] 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /packages/ui/components/ui/button.tsx: -------------------------------------------------------------------------------- 1 | import type { VariantProps } from "class-variance-authority"; 2 | import { forwardRef } from "react"; 3 | import { Slot } from "@radix-ui/react-slot"; 4 | import { cva } from "class-variance-authority"; 5 | 6 | import { cn } from "../../lib/utils"; 7 | 8 | const buttonVariants = cva( 9 | "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", 10 | { 11 | variants: { 12 | variant: { 13 | default: "bg-primary text-primary-foreground hover:bg-primary/90", 14 | destructive: 15 | "bg-destructive text-destructive-foreground hover:bg-destructive/90", 16 | outline: 17 | "border border-input bg-background hover:bg-accent hover:text-accent-foreground", 18 | secondary: 19 | "bg-secondary text-secondary-foreground hover:bg-secondary/80", 20 | ghost: "hover:bg-accent hover:text-accent-foreground", 21 | link: "text-primary underline-offset-4 hover:underline", 22 | }, 23 | size: { 24 | default: "h-10 px-4 py-2", 25 | sm: "h-9 rounded-md px-3", 26 | lg: "h-11 rounded-md px-8", 27 | icon: "h-10 w-10", 28 | }, 29 | }, 30 | defaultVariants: { 31 | variant: "default", 32 | size: "default", 33 | }, 34 | }, 35 | ); 36 | 37 | export interface ButtonProps 38 | extends React.ButtonHTMLAttributes, 39 | VariantProps { 40 | asChild?: boolean; 41 | } 42 | 43 | const Button = forwardRef( 44 | ({ className, variant, size, asChild = false, ...props }, ref) => { 45 | const Comp = asChild ? Slot : "button"; 46 | return ( 47 | 52 | ); 53 | }, 54 | ); 55 | Button.displayName = "Button"; 56 | 57 | export { Button, buttonVariants }; 58 | -------------------------------------------------------------------------------- /apps/api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "build": "nest build", 7 | "clean": "rm -rf node_modules build", 8 | "dev": "nest start --watch", 9 | "dev:debug": "nest start --debug --watch", 10 | "format": "prettier --check . --ignore-path ../../.gitignore", 11 | "lint": "eslint . --max-warnings 0", 12 | "start": "nest start", 13 | "start:prod": "node build/main", 14 | "test": "jest", 15 | "test:cov": "jest --coverage", 16 | "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", 17 | "test:e2e": "jest --config ./test/jest-e2e.json", 18 | "test:watch": "jest --watch", 19 | "typecheck": "tsc --noEmit" 20 | }, 21 | "prettier": "@acme/prettier-config", 22 | "eslintConfig": { 23 | "env": { 24 | "jest": true 25 | }, 26 | "extends": [ 27 | "@acme/eslint-config/base" 28 | ], 29 | "rules": { 30 | "@typescript-eslint/explicit-function-return-type": "off", 31 | "@typescript-eslint/explicit-module-boundary-types": "off", 32 | "@typescript-eslint/interface-name-prefix": "off", 33 | "@typescript-eslint/no-explicit-any": "off" 34 | }, 35 | "root": true 36 | }, 37 | "jest": { 38 | "collectCoverageFrom": [ 39 | "**/*.(t|j)s" 40 | ], 41 | "coverageDirectory": "../coverage", 42 | "moduleFileExtensions": [ 43 | "js", 44 | "json", 45 | "ts" 46 | ], 47 | "rootDir": "src", 48 | "testEnvironment": "node", 49 | "testRegex": ".*\\.spec\\.ts$", 50 | "transform": { 51 | "^.+\\.(t|j)s$": "ts-jest" 52 | } 53 | }, 54 | "dependencies": { 55 | "@nestjs/cache-manager": "^2.2.1", 56 | "@nestjs/common": "^10.3.3", 57 | "@nestjs/config": "^3.2.0", 58 | "@nestjs/core": "^10.3.3", 59 | "@nestjs/platform-express": "^10.3.3", 60 | "@nestjs/swagger": "^7.3.0", 61 | "cache-manager": "^5.4.0", 62 | "class-transformer": "^0.5.1", 63 | "class-validator": "^0.14.1", 64 | "reflect-metadata": "^0.2.2", 65 | "rxjs": "^7.8.1" 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /apps/desktop/electron/main.ts: -------------------------------------------------------------------------------- 1 | import path from "node:path"; 2 | import { app, BrowserWindow, shell } from "electron"; 3 | 4 | // The built directory structure 5 | // 6 | // ├─┬─┬ dist 7 | // │ │ └── index.html 8 | // │ │ 9 | // │ ├─┬ dist-electron 10 | // │ │ ├── main.js 11 | // │ │ └── preload.js 12 | // │ 13 | process.env.DIST = path.join(__dirname, "../dist"); 14 | process.env.VITE_PUBLIC = app.isPackaged 15 | ? process.env.DIST 16 | : path.join(process.env.DIST, "../public"); 17 | 18 | let win: BrowserWindow | null; 19 | // 🚧 Use ['ENV_NAME'] avoid vite:define plugin - Vite@2.x 20 | const VITE_DEV_SERVER_URL = process.env.VITE_DEV_SERVER_URL; 21 | 22 | function createWindow() { 23 | win = new BrowserWindow({ 24 | // minWidth: 640, 25 | // minHeight: 640, 26 | // width: 640, 27 | // height: 640, 28 | icon: path.join(process.env.VITE_PUBLIC, "icon.png"), 29 | webPreferences: { 30 | preload: path.join(__dirname, "preload.js"), 31 | }, 32 | }); 33 | 34 | // Test active push message to Renderer-process. 35 | win.webContents.on("did-finish-load", () => { 36 | win?.webContents.send("main-process-message", new Date().toLocaleString()); 37 | }); 38 | 39 | if (VITE_DEV_SERVER_URL) { 40 | win.loadURL(VITE_DEV_SERVER_URL); 41 | } else { 42 | // win.loadFile('DIST/index.html') 43 | win.loadFile(path.join(process.env.DIST, "index.html")); 44 | } 45 | 46 | win.webContents.setWindowOpenHandler(({ url }) => { 47 | shell.openExternal(url); 48 | return { action: "deny" }; 49 | }); 50 | } 51 | 52 | // Quit when all windows are closed, except on macOS. There, it's common 53 | // for applications and their menu bar to stay active until the user quits 54 | // explicitly with Cmd + Q. 55 | app.on("window-all-closed", () => { 56 | if (process.platform !== "darwin") { 57 | app.quit(); 58 | win = null; 59 | } 60 | }); 61 | 62 | app.on("activate", () => { 63 | // On OS X it's common to re-create a window in the app when the 64 | // dock icon is clicked and there are no other windows open. 65 | if (BrowserWindow.getAllWindows().length === 0) { 66 | createWindow(); 67 | } 68 | }); 69 | 70 | app.whenReady().then(createWindow); 71 | -------------------------------------------------------------------------------- /packages/ui/components/ui/card.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "../../lib/utils"; 4 | 5 | const Card = React.forwardRef< 6 | HTMLDivElement, 7 | React.HTMLAttributes 8 | >(({ className, ...props }, ref) => ( 9 |
17 | )); 18 | Card.displayName = "Card"; 19 | 20 | const CardHeader = React.forwardRef< 21 | HTMLDivElement, 22 | React.HTMLAttributes 23 | >(({ className, ...props }, ref) => ( 24 |
29 | )); 30 | CardHeader.displayName = "CardHeader"; 31 | 32 | const CardTitle = React.forwardRef< 33 | HTMLParagraphElement, 34 | React.HTMLAttributes 35 | >(({ className, ...props }, ref) => ( 36 |

44 | )); 45 | CardTitle.displayName = "CardTitle"; 46 | 47 | const CardDescription = React.forwardRef< 48 | HTMLParagraphElement, 49 | React.HTMLAttributes 50 | >(({ className, ...props }, ref) => ( 51 |

56 | )); 57 | CardDescription.displayName = "CardDescription"; 58 | 59 | const CardContent = React.forwardRef< 60 | HTMLDivElement, 61 | React.HTMLAttributes 62 | >(({ className, ...props }, ref) => ( 63 |

64 | )); 65 | CardContent.displayName = "CardContent"; 66 | 67 | const CardFooter = React.forwardRef< 68 | HTMLDivElement, 69 | React.HTMLAttributes 70 | >(({ className, ...props }, ref) => ( 71 |
76 | )); 77 | CardFooter.displayName = "CardFooter"; 78 | 79 | export { 80 | Card, 81 | CardHeader, 82 | CardFooter, 83 | CardTitle, 84 | CardDescription, 85 | CardContent, 86 | }; 87 | -------------------------------------------------------------------------------- /packages/ui/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./components/**/*.{ts,tsx}"], 4 | mode: "jit", 5 | plugins: [require("tailwindcss-animate")], 6 | theme: { 7 | container: { 8 | center: true, 9 | padding: "2rem", 10 | screens: { 11 | "2xl": "1400px", 12 | }, 13 | }, 14 | extend: { 15 | colors: { 16 | border: "hsl(var(--border))", 17 | input: "hsl(var(--input))", 18 | ring: "hsl(var(--ring))", 19 | background: "hsl(var(--background))", 20 | foreground: "hsl(var(--foreground))", 21 | primary: { 22 | DEFAULT: "hsl(var(--primary))", 23 | foreground: "hsl(var(--primary-foreground))", 24 | }, 25 | secondary: { 26 | DEFAULT: "hsl(var(--secondary))", 27 | foreground: "hsl(var(--secondary-foreground))", 28 | }, 29 | destructive: { 30 | DEFAULT: "hsl(var(--destructive))", 31 | foreground: "hsl(var(--destructive-foreground))", 32 | }, 33 | muted: { 34 | DEFAULT: "hsl(var(--muted))", 35 | foreground: "hsl(var(--muted-foreground))", 36 | }, 37 | accent: { 38 | DEFAULT: "hsl(var(--accent))", 39 | foreground: "hsl(var(--accent-foreground))", 40 | }, 41 | popover: { 42 | DEFAULT: "hsl(var(--popover))", 43 | foreground: "hsl(var(--popover-foreground))", 44 | }, 45 | card: { 46 | DEFAULT: "hsl(var(--card))", 47 | foreground: "hsl(var(--card-foreground))", 48 | }, 49 | }, 50 | borderRadius: { 51 | lg: "var(--radius)", 52 | md: "calc(var(--radius) - 2px)", 53 | sm: "calc(var(--radius) - 4px)", 54 | }, 55 | keyframes: { 56 | "accordion-down": { 57 | from: { height: "0" }, 58 | to: { height: "var(--radix-accordion-content-height)" }, 59 | }, 60 | "accordion-up": { 61 | from: { height: "var(--radix-accordion-content-height)" }, 62 | to: { height: "0" }, 63 | }, 64 | }, 65 | animation: { 66 | "accordion-down": "accordion-down 0.2s ease-out", 67 | "accordion-up": "accordion-up 0.2s ease-out", 68 | }, 69 | }, 70 | }, 71 | }; 72 | -------------------------------------------------------------------------------- /apps/mobile/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mobile", 3 | "version": "0.0.1", 4 | "private": true, 5 | "main": "index.js", 6 | "scripts": { 7 | "android": "expo run:android", 8 | "prebuild:e2e": "pnpm ios", 9 | "build:e2e": "../../node_modules/.bin/detox build -c ios.release", 10 | "build:e2e:android": "../../node_modules/.bin/detox build -c android.release", 11 | "clean": "rm -rf artifacts build coverage android ios node_modules .turbo .expo", 12 | "dev": "expo start -i -g", 13 | "eas-build-post-install": "pnpm run -w build:mobile", 14 | "format": "prettier --check . --ignore-path ../../.gitignore", 15 | "ios": "expo run:ios", 16 | "lint": "eslint . --max-warnings 0", 17 | "postinstall": "expo prebuild --no-install", 18 | "start": "expo start", 19 | "test": "../../node_modules/.bin/jest --silent --ci --coverage --testLocationInResults --json --outputFile=\"report.json\"", 20 | "test:debug": "../../node_modules/.bin/jest -o --watch --coverage=false", 21 | "test:dev": "../../node_modules/.bin/jest --watch --coverage=false --changedSince=origin/main", 22 | "test:e2e:android": "../../node_modules/.bin/detox test -c android.release --forceExit --cleanup", 23 | "test:e2e:android:headless": "../../node_modules/.bin/detox test -c android.release --forceExit --cleanup --headless", 24 | "test:e2e": "../../node_modules/.bin/detox test -c ios.release --forceExit --cleanup", 25 | "test:e2e:headless": "../../node_modules/.bin/detox test -c ios.release --forceExit --cleanup --headless", 26 | "test:update-snapshots": "../../node_modules/.bin/jest -u --coverage=false", 27 | "typecheck": "tsc --noEmit" 28 | }, 29 | "dependencies": { 30 | "expo": "^50.0.15", 31 | "expo-dev-client": "~3.3.11", 32 | "expo-splash-screen": "~0.26.4", 33 | "expo-status-bar": "1.11.1", 34 | "expo-updates": "0.24.12", 35 | "jest-expo": "^50.0.4", 36 | "react": "18.2.0", 37 | "react-dom": "18.2.0", 38 | "react-native": "0.73.6", 39 | "react-native-web": "~0.19.10" 40 | }, 41 | "eslintConfig": { 42 | "extends": [ 43 | "@acme/eslint-config/base", 44 | "@acme/eslint-config/react" 45 | ], 46 | "ignorePatterns": [ 47 | "expo-plugins/**" 48 | ], 49 | "root": true 50 | }, 51 | "prettier": "@acme/prettier-config", 52 | "devDependencies": { 53 | "@babel/core": "^7.24.4" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /apps/frontend/playwright.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, devices } from "@playwright/test"; 2 | 3 | /** 4 | * Read environment variables from file. 5 | * https://github.com/motdotla/dotenv 6 | */ 7 | // require('dotenv').config(); 8 | 9 | /** 10 | * See https://playwright.dev/docs/test-configuration. 11 | */ 12 | export default defineConfig({ 13 | testDir: "./e2e", 14 | /* Run tests in files in parallel */ 15 | fullyParallel: true, 16 | /* Fail the build on CI if you accidentally left test.only in the source code. */ 17 | forbidOnly: !!process.env.CI, 18 | /* Retry on CI only */ 19 | retries: process.env.CI ? 2 : 0, 20 | /* Opt out of parallel tests on CI. */ 21 | workers: process.env.CI ? 1 : undefined, 22 | /* Reporter to use. See https://playwright.dev/docs/test-reporters */ 23 | reporter: "line", 24 | /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ 25 | use: { 26 | /* Base URL to use in actions like `await page.goto('/')`. */ 27 | // baseURL: 'http://127.0.0.1:3000', 28 | 29 | /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ 30 | trace: "on-first-retry", 31 | }, 32 | 33 | /* Configure projects for major browsers */ 34 | projects: [ 35 | { 36 | name: "chromium", 37 | use: { ...devices["Desktop Chrome"] }, 38 | }, 39 | 40 | { 41 | name: "firefox", 42 | use: { ...devices["Desktop Firefox"] }, 43 | }, 44 | 45 | { 46 | name: "webkit", 47 | use: { ...devices["Desktop Safari"] }, 48 | }, 49 | 50 | /* Test against mobile viewports. */ 51 | // { 52 | // name: 'Mobile Chrome', 53 | // use: { ...devices['Pixel 5'] }, 54 | // }, 55 | // { 56 | // name: 'Mobile Safari', 57 | // use: { ...devices['iPhone 12'] }, 58 | // }, 59 | 60 | /* Test against branded browsers. */ 61 | // { 62 | // name: 'Microsoft Edge', 63 | // use: { ...devices['Desktop Edge'], channel: 'msedge' }, 64 | // }, 65 | // { 66 | // name: 'Google Chrome', 67 | // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, 68 | // }, 69 | ], 70 | 71 | /* Run your local dev server before starting the tests */ 72 | webServer: { 73 | command: "npm run start", 74 | url: "http://127.0.0.1:3000", 75 | reuseExistingServer: !process.env.CI, 76 | }, 77 | }); 78 | -------------------------------------------------------------------------------- /packages/ui/components/auth/form.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "../../lib/utils"; 4 | import { Button } from "../ui/button"; 5 | import { Icons } from "../ui/icons"; 6 | import { Input } from "../ui/input"; 7 | import { Label } from "../ui/label"; 8 | 9 | interface UserAuthFormProps extends React.HTMLAttributes {} 10 | 11 | export function AuthenticationForm({ className, ...props }: UserAuthFormProps) { 12 | const [isLoading, setIsLoading] = React.useState(false); 13 | 14 | function onSubmit(event: React.SyntheticEvent) { 15 | event.preventDefault(); 16 | setIsLoading(true); 17 | 18 | setTimeout(() => { 19 | setIsLoading(false); 20 | }, 3000); 21 | } 22 | 23 | return ( 24 |
25 |
26 |
27 |
28 | 31 | 40 |
41 | 47 |
48 |
49 |
50 |
51 | 52 |
53 |
54 | 55 | Or continue with 56 | 57 |
58 |
59 | 67 |
68 | ); 69 | } 70 | -------------------------------------------------------------------------------- /apps/mobile/.detoxrc.js: -------------------------------------------------------------------------------- 1 | /** @type {Detox.DetoxConfig} */ 2 | module.exports = { 3 | logger: { 4 | level: "fatal", 5 | }, 6 | testRunner: { 7 | args: { 8 | $0: "../../node_modules/.bin/jest", 9 | config: "config/setupDetox.json", 10 | }, 11 | jest: { 12 | setupTimeout: 120000, 13 | }, 14 | }, 15 | artifacts: { 16 | plugins: { 17 | log: process.env.CI ? "failing" : undefined, 18 | screenshot: "failing", 19 | }, 20 | }, 21 | apps: { 22 | "ios.release": { 23 | type: "ios.app", 24 | build: 25 | "xcodebuild -workspace ios/onelove.xcworkspace -scheme onelove -configuration Release -sdk iphonesimulator -arch x86_64 -derivedDataPath ios/build", 26 | binaryPath: 27 | "ios/build/Build/Products/Release-iphonesimulator/onelove.app", 28 | }, 29 | "android.release": { 30 | type: "android.apk", 31 | build: 32 | "cd android && ./gradlew :app:assembleRelease :app:assembleAndroidTest -DtestBuildType=release && cd ..", 33 | binaryPath: "android/app/build/outputs/apk/release/app-release.apk", 34 | }, 35 | }, 36 | devices: { 37 | simulator: { 38 | type: "ios.simulator", 39 | device: { 40 | type: "iPhone 13 mini", 41 | }, 42 | }, 43 | attached: { 44 | type: "android.attached", 45 | device: { 46 | adbName: ".*", 47 | }, 48 | }, 49 | emulator: { 50 | type: "android.emulator", 51 | device: { 52 | avdName: "Pixel_3a_API_30_x86", 53 | }, 54 | }, 55 | }, 56 | configurations: { 57 | "ios.debug": { 58 | device: "simulator", 59 | app: "ios.debug", 60 | }, 61 | "ios.release": { 62 | device: "simulator", 63 | app: "ios.release", 64 | }, 65 | "ios.sim.debug": { 66 | device: "simulator", 67 | app: "ios.debug", 68 | }, 69 | "ios.sim.release": { 70 | device: "simulator", 71 | app: "ios.release", 72 | }, 73 | "android.att.debug": { 74 | device: "attached", 75 | app: "android.debug", 76 | }, 77 | "android.att.release": { 78 | device: "attached", 79 | app: "android.release", 80 | }, 81 | "android.emu.debug": { 82 | device: "emulator", 83 | app: "android.debug", 84 | }, 85 | "android.emu.release": { 86 | device: "emulator", 87 | app: "android.release", 88 | }, 89 | }, 90 | }; 91 | -------------------------------------------------------------------------------- /packages/ui/components/layout/navbar.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useEffect, useState } from "react"; 4 | import Link from "next/link"; 5 | import { MenuIcon, XIcon } from "lucide-react"; 6 | 7 | import { Button } from "../ui/button"; 8 | 9 | interface NavLink { 10 | route: string; 11 | path: string; 12 | } 13 | 14 | export interface NavbarProps { 15 | siteName: string; 16 | navLinks: NavLink[]; 17 | } 18 | 19 | export function Navbar(props: NavbarProps) { 20 | const [isMenuOpen, setMenuOpen] = useState(false); 21 | 22 | useEffect(() => { 23 | document.body.style.overflow = isMenuOpen ? "hidden" : "auto"; 24 | }, [isMenuOpen]); 25 | 26 | const menuIcon = isMenuOpen ? ( 27 | 28 | ) : ( 29 | 30 | ); 31 | 32 | return ( 33 |
34 | 79 |
80 | ); 81 | } 82 | -------------------------------------------------------------------------------- /apps/mobile/report.json: -------------------------------------------------------------------------------- 1 | { 2 | "numFailedTestSuites": 0, 3 | "numFailedTests": 0, 4 | "numPassedTestSuites": 1, 5 | "numPassedTests": 1, 6 | "numPendingTestSuites": 0, 7 | "numPendingTests": 0, 8 | "numRuntimeErrorTestSuites": 0, 9 | "numTodoTests": 0, 10 | "numTotalTestSuites": 1, 11 | "numTotalTests": 1, 12 | "openHandles": [], 13 | "snapshot": { 14 | "added": 0, 15 | "didUpdate": false, 16 | "failure": false, 17 | "filesAdded": 0, 18 | "filesRemoved": 0, 19 | "filesRemovedList": [], 20 | "filesUnmatched": 0, 21 | "filesUpdated": 0, 22 | "matched": 0, 23 | "total": 0, 24 | "unchecked": 0, 25 | "uncheckedKeysByFile": [], 26 | "unmatched": 0, 27 | "updated": 0 28 | }, 29 | "startTime": 1748442230602, 30 | "success": true, 31 | "testResults": [ 32 | { 33 | "assertionResults": [ 34 | { 35 | "ancestorTitles": ["App"], 36 | "duration": 1, 37 | "failureDetails": [], 38 | "failureMessages": [], 39 | "fullName": "App should be true", 40 | "invocations": 1, 41 | "location": { "column": 3, "line": 2 }, 42 | "numPassingAsserts": 1, 43 | "retryReasons": [], 44 | "status": "passed", 45 | "title": "should be true" 46 | } 47 | ], 48 | "endTime": 1748442231481, 49 | "message": "", 50 | "name": "/Users/dev/Development/active/onelove/apps/mobile/src/__tests__/app.test.ts", 51 | "startTime": 1748442231197, 52 | "status": "passed", 53 | "summary": "" 54 | } 55 | ], 56 | "wasInterrupted": false, 57 | "coverageMap": { 58 | "/Users/dev/Development/active/onelove/apps/mobile/src/App.tsx": { 59 | "path": "/Users/dev/Development/active/onelove/apps/mobile/src/App.tsx", 60 | "statementMap": { 61 | "0": { 62 | "start": { "line": 5, "column": 2 }, 63 | "end": { "line": 10, "column": 4 } 64 | } 65 | }, 66 | "fnMap": { 67 | "0": { 68 | "name": "App", 69 | "decl": { 70 | "start": { "line": 4, "column": 24 }, 71 | "end": { "line": 4, "column": 27 } 72 | }, 73 | "loc": { 74 | "start": { "line": 4, "column": 30 }, 75 | "end": { "line": 11, "column": 1 } 76 | }, 77 | "line": 4 78 | } 79 | }, 80 | "branchMap": {}, 81 | "s": { "0": 0 }, 82 | "f": { "0": 0 }, 83 | "b": {} 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /packages/ui/components/ui/calendar.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import { ChevronLeft, ChevronRight } from "lucide-react"; 5 | import { DayPicker } from "react-day-picker"; 6 | 7 | import { cn } from "../../lib/utils"; 8 | import { buttonVariants } from "./button"; 9 | 10 | export type CalendarProps = React.ComponentProps; 11 | 12 | function Calendar({ 13 | className, 14 | classNames, 15 | showOutsideDays = true, 16 | ...props 17 | }: CalendarProps) { 18 | return ( 19 | , 58 | IconRight: () => , 59 | }} 60 | {...props} 61 | /> 62 | ); 63 | } 64 | Calendar.displayName = "Calendar"; 65 | 66 | export { Calendar }; 67 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "onelove", 3 | "private": true, 4 | "scripts": { 5 | "build": "turbo build", 6 | "clean": "turbo clean && rm -rf .turbo node_modules", 7 | "dev": "turbo dev --parallel", 8 | "format": "turbo format --continue -- --cache --cache-location node_modules/.cache/.prettiercache", 9 | "format:fix": "turbo format --continue -- --write --cache --cache-location node_modules/.cache/.prettiercache", 10 | "lint": "turbo lint --continue --", 11 | "lint:fix": "turbo lint --continue -- --fix --cache --cache-location node_modules/.cache/.eslintcache", 12 | "test": "turbo test", 13 | "typecheck": "turbo typecheck", 14 | "ui:add": "pnpm --filter ui ui:add" 15 | }, 16 | "prettier": "@acme/prettier-config", 17 | "devDependencies": { 18 | "@acme/eslint-config": "workspace:*", 19 | "@acme/prettier-config": "workspace:*", 20 | "@acme/tsconfig": "workspace:*", 21 | "@apify/tsconfig": "^0.1.1", 22 | "@babel/core": "^7.27.3", 23 | "@config-plugins/detox": "^7.0.0", 24 | "@ianvs/prettier-plugin-sort-imports": "^4.4.1", 25 | "@nestjs/cli": "^10.4.9", 26 | "@nestjs/schematics": "^10.2.3", 27 | "@nestjs/testing": "^10.4.18", 28 | "@next/eslint-plugin-next": "^14.2.29", 29 | "@plasmohq/prettier-plugin-sort-imports": "4.0.1", 30 | "@types/chrome": "0.0.266", 31 | "@types/eslint": "^8.56.12", 32 | "@types/express": "^4.17.22", 33 | "@types/jest": "^29.5.14", 34 | "@types/node": "^20.17.51", 35 | "@types/react": "^18.3.23", 36 | "@types/react-dom": "^18.3.7", 37 | "@types/supertest": "^6.0.3", 38 | "@typescript-eslint/eslint-plugin": "^7.18.0", 39 | "@typescript-eslint/parser": "^7.18.0", 40 | "@vitejs/plugin-react": "^4.5.0", 41 | "autoprefixer": "^10.4.21", 42 | "babel-preset-expo": "10.0.1", 43 | "detox": "^20.39.0", 44 | "electron": "^29.4.6", 45 | "electron-builder": "^24.13.3", 46 | "eslint": "8.57.0", 47 | "eslint-config-prettier": "^9.1.0", 48 | "eslint-config-turbo": "^1.13.4", 49 | "eslint-plugin-import": "^2.31.0", 50 | "eslint-plugin-jsx-a11y": "^6.10.2", 51 | "eslint-plugin-react": "^7.37.5", 52 | "eslint-plugin-react-hooks": "^4.6.2", 53 | "jest": "^29.7.0", 54 | "lefthook": "^1.11.13", 55 | "postcss": "^8.5.3", 56 | "prettier": "^3.5.3", 57 | "prettier-plugin-tailwindcss": "^0.5.14", 58 | "source-map-support": "^0.5.21", 59 | "supertest": "^6.3.4", 60 | "tailwind-merge": "^2.6.0", 61 | "tailwindcss": "^3.4.17", 62 | "tailwindcss-animate": "^1.0.7", 63 | "ts-jest": "^29.3.4", 64 | "ts-loader": "^9.5.2", 65 | "ts-node": "^10.9.2", 66 | "tsconfig-paths": "^4.2.0", 67 | "tsup": "^8.5.0", 68 | "tsx": "^4.19.4", 69 | "turbo": "^1.13.4", 70 | "typescript": "5.4.5", 71 | "vite": "^5.4.19", 72 | "vite-plugin-electron": "^0.28.8", 73 | "vite-plugin-electron-renderer": "^0.14.6" 74 | }, 75 | "packageManager": "pnpm@9.0.0", 76 | "engines": { 77 | "node": ">=18" 78 | }, 79 | "pnpm": { 80 | "peerDependencyRules": { 81 | "ignoreMissing": [ 82 | "@babel/*", 83 | "expo-modules-*", 84 | "typescript" 85 | ] 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /packages/ui/components/ui/table.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "../../lib/utils"; 4 | 5 | const Table = React.forwardRef< 6 | HTMLTableElement, 7 | React.HTMLAttributes 8 | >(({ className, ...props }, ref) => ( 9 |
10 | 15 | 16 | )); 17 | Table.displayName = "Table"; 18 | 19 | const TableHeader = React.forwardRef< 20 | HTMLTableSectionElement, 21 | React.HTMLAttributes 22 | >(({ className, ...props }, ref) => ( 23 | 24 | )); 25 | TableHeader.displayName = "TableHeader"; 26 | 27 | const TableBody = React.forwardRef< 28 | HTMLTableSectionElement, 29 | React.HTMLAttributes 30 | >(({ className, ...props }, ref) => ( 31 | 36 | )); 37 | TableBody.displayName = "TableBody"; 38 | 39 | const TableFooter = React.forwardRef< 40 | HTMLTableSectionElement, 41 | React.HTMLAttributes 42 | >(({ className, ...props }, ref) => ( 43 | tr]:last:border-b-0", 47 | className, 48 | )} 49 | {...props} 50 | /> 51 | )); 52 | TableFooter.displayName = "TableFooter"; 53 | 54 | const TableRow = React.forwardRef< 55 | HTMLTableRowElement, 56 | React.HTMLAttributes 57 | >(({ className, ...props }, ref) => ( 58 | 66 | )); 67 | TableRow.displayName = "TableRow"; 68 | 69 | const TableHead = React.forwardRef< 70 | HTMLTableCellElement, 71 | React.ThHTMLAttributes 72 | >(({ className, ...props }, ref) => ( 73 |
81 | )); 82 | TableHead.displayName = "TableHead"; 83 | 84 | const TableCell = React.forwardRef< 85 | HTMLTableCellElement, 86 | React.TdHTMLAttributes 87 | >(({ className, ...props }, ref) => ( 88 | 93 | )); 94 | TableCell.displayName = "TableCell"; 95 | 96 | const TableCaption = React.forwardRef< 97 | HTMLTableCaptionElement, 98 | React.HTMLAttributes 99 | >(({ className, ...props }, ref) => ( 100 |
105 | )); 106 | TableCaption.displayName = "TableCaption"; 107 | 108 | export { 109 | Table, 110 | TableHeader, 111 | TableBody, 112 | TableFooter, 113 | TableHead, 114 | TableRow, 115 | TableCell, 116 | TableCaption, 117 | }; 118 | -------------------------------------------------------------------------------- /apps/api/README.md: -------------------------------------------------------------------------------- 1 |

2 | Nest Logo 3 |

4 | 5 | [circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 6 | [circleci-url]: https://circleci.com/gh/nestjs/nest 7 | 8 |

A progressive Node.js framework for building efficient and scalable server-side applications.

9 |

10 | NPM Version 11 | Package License 12 | NPM Downloads 13 | CircleCI 14 | Coverage 15 | Discord 16 | Backers on Open Collective 17 | Sponsors on Open Collective 18 | 19 | Support us 20 | 21 |

22 | 24 | 25 | ## Description 26 | 27 | [Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. 28 | 29 | ## Installation 30 | 31 | ```bash 32 | $ npm install 33 | ``` 34 | 35 | ## Running the app 36 | 37 | ```bash 38 | # development 39 | $ npm run start 40 | 41 | # watch mode 42 | $ npm run start:dev 43 | 44 | # production mode 45 | $ npm run start:prod 46 | ``` 47 | 48 | ## Test 49 | 50 | ```bash 51 | # unit tests 52 | $ npm run test 53 | 54 | # e2e tests 55 | $ npm run test:e2e 56 | 57 | # test coverage 58 | $ npm run test:cov 59 | ``` 60 | 61 | ## Support 62 | 63 | Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). 64 | 65 | ## Stay in touch 66 | 67 | - Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) 68 | - Website - [https://nestjs.com](https://nestjs.com/) 69 | - Twitter - [@nestframework](https://twitter.com/nestframework) 70 | 71 | ## License 72 | 73 | Nest is [MIT licensed](LICENSE). 74 | -------------------------------------------------------------------------------- /apps/frontend/public/turborepo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /apps/desktop/electron/preload.ts: -------------------------------------------------------------------------------- 1 | import { contextBridge, ipcRenderer } from "electron"; 2 | 3 | // --------- Expose some API to the Renderer process --------- 4 | contextBridge.exposeInMainWorld("ipcRenderer", withPrototype(ipcRenderer)); 5 | 6 | // `exposeInMainWorld` can't detect attributes and methods of `prototype`, manually patching it. 7 | function withPrototype(obj: Record) { 8 | const protos = Object.getPrototypeOf(obj); 9 | 10 | for (const [key, value] of Object.entries(protos)) { 11 | if (Object.prototype.hasOwnProperty.call(obj, key)) continue; 12 | 13 | if (typeof value === "function") { 14 | // Some native APIs, like `NodeJS.EventEmitter['on']`, don't work in the Renderer process. Wrapping them into a function. 15 | obj[key] = function (...args: any) { 16 | return value.call(obj, ...args); 17 | }; 18 | } else { 19 | obj[key] = value; 20 | } 21 | } 22 | return obj; 23 | } 24 | 25 | // --------- Preload scripts loading --------- 26 | function domReady( 27 | condition: DocumentReadyState[] = ["complete", "interactive"], 28 | ) { 29 | return new Promise((resolve) => { 30 | if (condition.includes(document.readyState)) { 31 | resolve(true); 32 | } else { 33 | document.addEventListener("readystatechange", () => { 34 | if (condition.includes(document.readyState)) { 35 | resolve(true); 36 | } 37 | }); 38 | } 39 | }); 40 | } 41 | 42 | const safeDOM = { 43 | append(parent: HTMLElement, child: HTMLElement) { 44 | if (!Array.from(parent.children).find((e) => e === child)) { 45 | parent.appendChild(child); 46 | } 47 | }, 48 | remove(parent: HTMLElement, child: HTMLElement) { 49 | if (Array.from(parent.children).find((e) => e === child)) { 50 | parent.removeChild(child); 51 | } 52 | }, 53 | }; 54 | 55 | /** 56 | * https://tobiasahlin.com/spinkit 57 | * https://connoratherton.com/loaders 58 | * https://projects.lukehaas.me/css-loaders 59 | * https://matejkustec.github.io/SpinThatShit 60 | */ 61 | function useLoading() { 62 | const className = `loaders-css__square-spin`; 63 | const styleContent = ` 64 | @keyframes square-spin { 65 | 25% { transform: perspective(100px) rotateX(180deg) rotateY(0); } 66 | 50% { transform: perspective(100px) rotateX(180deg) rotateY(180deg); } 67 | 75% { transform: perspective(100px) rotateX(0) rotateY(180deg); } 68 | 100% { transform: perspective(100px) rotateX(0) rotateY(0); } 69 | } 70 | .${className} > div { 71 | animation-fill-mode: both; 72 | width: 50px; 73 | height: 50px; 74 | background: #fff; 75 | animation: square-spin 3s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite; 76 | } 77 | .app-loading-wrap { 78 | position: fixed; 79 | top: 0; 80 | left: 0; 81 | width: 100vw; 82 | height: 100vh; 83 | display: flex; 84 | align-items: center; 85 | justify-content: center; 86 | background: #282c34; 87 | z-index: 9; 88 | } 89 | `; 90 | const oStyle = document.createElement("style"); 91 | const oDiv = document.createElement("div"); 92 | 93 | oStyle.id = "app-loading-style"; 94 | oStyle.innerHTML = styleContent; 95 | oDiv.className = "app-loading-wrap"; 96 | oDiv.innerHTML = `
`; 97 | 98 | return { 99 | appendLoading() { 100 | safeDOM.append(document.head, oStyle); 101 | safeDOM.append(document.body, oDiv); 102 | }, 103 | removeLoading() { 104 | safeDOM.remove(document.head, oStyle); 105 | safeDOM.remove(document.body, oDiv); 106 | }, 107 | }; 108 | } 109 | 110 | // ---------------------------------------------------------------------- 111 | 112 | const { appendLoading, removeLoading } = useLoading(); 113 | domReady().then(appendLoading); 114 | 115 | window.onmessage = (ev) => { 116 | ev.data.payload === "removeLoading" && removeLoading(); 117 | }; 118 | 119 | setTimeout(removeLoading, 4999); 120 | -------------------------------------------------------------------------------- /packages/ui/components/ui/dropdown-menu.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; 5 | import { Check, ChevronRight, Circle } from "lucide-react"; 6 | 7 | import { cn } from "../../lib/utils"; 8 | 9 | const DropdownMenu = DropdownMenuPrimitive.Root; 10 | 11 | const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; 12 | 13 | const DropdownMenuGroup = DropdownMenuPrimitive.Group; 14 | 15 | const DropdownMenuPortal = DropdownMenuPrimitive.Portal; 16 | 17 | const DropdownMenuSub = DropdownMenuPrimitive.Sub; 18 | 19 | const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup; 20 | 21 | const DropdownMenuSubTrigger = React.forwardRef< 22 | React.ElementRef, 23 | React.ComponentPropsWithoutRef & { 24 | inset?: boolean; 25 | } 26 | >(({ className, inset, children, ...props }, ref) => ( 27 | 36 | {children} 37 | 38 | 39 | )); 40 | DropdownMenuSubTrigger.displayName = 41 | DropdownMenuPrimitive.SubTrigger.displayName; 42 | 43 | const DropdownMenuSubContent = React.forwardRef< 44 | React.ElementRef, 45 | React.ComponentPropsWithoutRef 46 | >(({ className, ...props }, ref) => ( 47 | 55 | )); 56 | DropdownMenuSubContent.displayName = 57 | DropdownMenuPrimitive.SubContent.displayName; 58 | 59 | const DropdownMenuContent = React.forwardRef< 60 | React.ElementRef, 61 | React.ComponentPropsWithoutRef 62 | >(({ className, sideOffset = 4, ...props }, ref) => ( 63 | 64 | 73 | 74 | )); 75 | DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; 76 | 77 | const DropdownMenuItem = React.forwardRef< 78 | React.ElementRef, 79 | React.ComponentPropsWithoutRef & { 80 | inset?: boolean; 81 | } 82 | >(({ className, inset, ...props }, ref) => ( 83 | 92 | )); 93 | DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; 94 | 95 | const DropdownMenuCheckboxItem = React.forwardRef< 96 | React.ElementRef, 97 | React.ComponentPropsWithoutRef 98 | >(({ className, children, checked, ...props }, ref) => ( 99 | 108 | 111 | 112 | 113 | 114 | 115 | {children} 116 | 117 | )); 118 | DropdownMenuCheckboxItem.displayName = 119 | DropdownMenuPrimitive.CheckboxItem.displayName; 120 | 121 | const DropdownMenuRadioItem = React.forwardRef< 122 | React.ElementRef, 123 | React.ComponentPropsWithoutRef 124 | >(({ className, children, ...props }, ref) => ( 125 | 133 | 136 | 137 | 138 | 139 | 140 | {children} 141 | 142 | )); 143 | DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; 144 | 145 | const DropdownMenuLabel = React.forwardRef< 146 | React.ElementRef, 147 | React.ComponentPropsWithoutRef & { 148 | inset?: boolean; 149 | } 150 | >(({ className, inset, ...props }, ref) => ( 151 | 160 | )); 161 | DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; 162 | 163 | const DropdownMenuSeparator = React.forwardRef< 164 | React.ElementRef, 165 | React.ComponentPropsWithoutRef 166 | >(({ className, ...props }, ref) => ( 167 | 172 | )); 173 | DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; 174 | 175 | const DropdownMenuShortcut = ({ 176 | className, 177 | ...props 178 | }: React.HTMLAttributes) => { 179 | return ( 180 | 184 | ); 185 | }; 186 | DropdownMenuShortcut.displayName = "DropdownMenuShortcut"; 187 | 188 | export { 189 | DropdownMenu, 190 | DropdownMenuTrigger, 191 | DropdownMenuContent, 192 | DropdownMenuItem, 193 | DropdownMenuCheckboxItem, 194 | DropdownMenuRadioItem, 195 | DropdownMenuLabel, 196 | DropdownMenuSeparator, 197 | DropdownMenuShortcut, 198 | DropdownMenuGroup, 199 | DropdownMenuPortal, 200 | DropdownMenuSub, 201 | DropdownMenuSubContent, 202 | DropdownMenuSubTrigger, 203 | DropdownMenuRadioGroup, 204 | }; 205 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # onelove 🫶 2 | 3 |
4 | 5 |
6 | 7 | ## 🚀 Motivation 8 | 9 | As a creator and relentless dreamer, navigating the intricate process of crafting complete products felt overwhelming. Developing frontend, backend, mobile, Scraper, and various components for each repository seemed like a series of separate battles and redundant efforts. I envisioned a space where the challenges of developing entire products could be addressed directly. A place where collaboration flowed naturally, contracts seamlessly, and tooling was a boon rather than a necessary evil. 10 | 11 | ## 🎯 Goals 12 | - **Technology Agnostic:** Use your preferred tech stack - be it Vercel, GCP, AWS, Supabase, Firebase, Prisma, Drizzle, etc. 13 | - **Ease of Use:** No boilerplate code, no unnecessary folder structures - just simplicity. 14 | - **Frameworks with Community Support:** Leverage widely-used frameworks with large communities such as Next.js, Nest.js, React Native, Electron, Playwright, and Plasmo. 15 | 16 | ## 📚 Table of Contents 17 | 18 | - [Getting Started](#getting-started) 19 | - [Motivation](#motivation) 20 | - [What's Inside](#whats-inside) 21 | - [Dependencies](#dependencies) 22 | - [Running e2e Tests](#running-e2e-tests) 23 | - [Changelog](#changelog) 24 | - [Contributing](#contributing) 25 | - [License](#license) 26 | 27 | ## 🚀 Getting Started 28 | 29 | **Step 1:** The easiest way to get started is to clone the repository: 30 | 31 | ```bash 32 | # Get the latest snapshot 33 | git clone https://github.com/suchcodemuchwow/onelove.git myproject 34 | 35 | # Change directory 36 | cd myproject 37 | 38 | # Install NPM dependencies 39 | pnpm install 40 | 41 | # Then simply start your app 42 | pnpm dev 43 | ``` 44 | 45 | ## 📦 What's Inside? 46 | 47 | This Turborepo includes the following packages/apps: 48 | 49 |
50 | 51 |
52 | 53 | #### Apps 54 | 55 | - `frontend`: a [Next.js](https://nextjs.org/) app 56 | - `api`: a [Nest.js](https://nestjs.com/) api 57 | - `mobile`: a [React Native-Expo](https://expo.dev/) app 58 | - `extension`: a [Plasmo](https://www.plasmo.com/) browser extension 59 | - `desktop`: an [Electron](http://electron.atom.io/) app 60 | - `scraper`: a [Playwright](https://playwright.dev/) app 61 | 62 | #### Packages 63 | 64 | - `@acme/ui`: [Shadcn](https://ui.shadcn.com/) ui library 65 | - `@acme/eslint-config`: `eslint` configurations 66 | - `@acme/typescript-config`: `tsconfig.json`s used throughout the monorepo 67 | 68 | #### Utilities 69 | 70 | This Turborepo has some additional tools already set up for you: 71 | 72 | - [TypeScript](https://www.typescriptlang.org/) for static type checking 73 | - [ESLint](https://eslint.org/) for code linting 74 | - [Prettier](https://prettier.io) for code formatting 75 | - [Renovate](https://docs.renovatebot.com) for dependency updates 76 | - [Lefthook](https://github.com/evilmartians/lefthook) for git hooks 77 | 78 | ## 🛠️ Dependencies 79 | | Package | Description | 80 | | ------------------------------------------ | ----------------------------------------------------------------------- | 81 | | **crawlee** | Web scraping library. | 82 | | **electron** | Cross-platform desktop application framework. | 83 | | **eslint** | JavaScript and TypeScript code quality checker. | 84 | | **expo** | Framework for building universal native apps. | 85 | | **jest** | JavaScript testing framework. | 86 | | **lefthook** | Git hooks manager. | 87 | | **next** | React framework for static websites. | 88 | | **playwright** | Node library to automate browsers. | 89 | | **plasmo** | Browser extension framework. | 90 | | **prettier** | Opinionated code formatter. | 91 | | **react** | JavaScript library for building user interfaces. | 92 | | **react-native** | Framework for building native apps using React. | 93 | | **react-native-web** | React Native for the web. | 94 | | **tailwindcss** | Utility-first CSS framework. | 95 | | **turbo** | High-performance build system for JavaScript and TypeScript. | 96 | | **typescript** | TypeScript language. | 97 | | **vite** | Fast development server and build tool. | 98 | | @babel/core | Babel compiler core. | 99 | | @ianvs/prettier-plugin-sort-imports | Prettier plugin for sorting imports. | 100 | | @nestjs/cache-manager | NestJS cache manager. | 101 | | @nestjs/cli | NestJS command line interface. | 102 | | @nestjs/common | NestJS common utilities and decorators. | 103 | | @nestjs/config | NestJS configuration module. | 104 | | @nestjs/core | NestJS core framework. | 105 | | @nestjs/platform-express | NestJS HTTP server platform. | 106 | | @nestjs/schematics | NestJS schematics. | 107 | | @nestjs/swagger | NestJS OpenAPI (Swagger) integration. | 108 | | @next/eslint-plugin-next | ESLint plugin for Next.js. | 109 | | @plasmohq/messaging | PlasmoHQ messaging library. | 110 | | @plasmohq/prettier-plugin-sort-imports | Prettier plugin for sorting imports (PlasmoHQ version). | 111 | | @typescript-eslint/eslint-plugin | TypeScript ESLint plugin. | 112 | | @typescript-eslint/parser | TypeScript ESLint parser. | 113 | | @vitejs/plugin-react | Vite plugin for React. | 114 | | autoprefixer | PostCSS plugin to parse CSS and add vendor prefixes. | 115 | | babel-preset-expo | Babel preset for Expo projects. | 116 | | cache-manager | Generic caching module for Node.js. | 117 | | class-transformer | Decorator-based object transformation library. | 118 | | class-validator | Validator and sanitizer for classes. | 119 | | electron-builder | Create installers for Electron apps. | 120 | | eslint-config-prettier | ESLint configuration for Prettier. | 121 | | eslint-config-turbo | Turbo's ESLint configuration. | 122 | | eslint-plugin-import | ESLint plugin for import/export syntax. | 123 | | eslint-plugin-jsx-a11y | ESLint plugin for JSX accessibility rules. | 124 | | eslint-plugin-react | ESLint plugin for React. | 125 | | eslint-plugin-react-hooks | ESLint plugin for React Hooks. | 126 | | expo-dev-client | Expo development client. | 127 | | expo-status-bar | Expo status bar component. | 128 | | expo-updates | Expo updates module. | 129 | | lucide-react | SVG icon component library. | 130 | | postcss | Tool for transforming styles with JS plugins. | 131 | | prettier-plugin-tailwindcss | Prettier plugin for Tailwind CSS. | 132 | | react-dom | Entry point to the DOM and server renderers for React. | 133 | | react-router-dom | Declarative routing for React.js. | 134 | | reflect-metadata | Decorator metadata reflection library. | 135 | | rxjs | Reactive programming library. | 136 | | source-map-support | Adds source map support to Node.js. | 137 | | supertest | HTTP assertion library for testing Node.js HTTP servers. | 138 | | tailwind-merge | Tailwind CSS utility for merging configurations. | 139 | | tailwindcss-animate | Tailwind CSS plugin for animations. | 140 | | ts-jest | Jest preprocessor for TypeScript. | 141 | | ts-loader | TypeScript loader for webpack. | 142 | | ts-node | TypeScript execution environment for Node.js. | 143 | | tsconfig-paths | Resolve TypeScript module aliases. | 144 | | tsup | TypeScript module bundler. | 145 | | tsx | TypeScript React JSX support. | 146 | | vite-plugin-electron | Vite plugin for Electron. | 147 | | vite-plugin-electron-renderer | Vite plugin for Electron renderer. | 148 | 149 | ## 🧪 Running e2e Tests 150 | To run e2e tests for mobile, ensure you have the following installed: 151 | 152 | ```bash 153 | # Install applesimutils 154 | brew tap wix/brew 155 | brew install applesimutils 156 | ``` 157 | 158 | Please run the mobile app the first time you start using the repository; otherwise, Detox may not find the app. 159 | 160 | ## 📝 Todo 161 | - [ ] Shared types package 162 | 163 | ## 📜 Changelog 164 | Check out the changelog for the project [here](https://github.com/suchcodemuchwow/onelove/blob/main/CHANGELOG.md). 165 | 166 | ## 🤝 Contributing 167 | If something is unclear, confusing, or needs refactoring, please let me know. Pull requests are always welcome. Please open an issue before submitting a pull request. This project adheres to the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) with a few minor exceptions. 168 | 169 | ## 📄 License 170 | Copyright (c) 2023-2024 suchcodemuchwow 171 | 172 | 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: 173 | 174 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 175 | 176 | 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. -------------------------------------------------------------------------------- /packages/ui/components/ui/icons.tsx: -------------------------------------------------------------------------------- 1 | type IconProps = React.HTMLAttributes; 2 | 3 | export const Icons = { 4 | logo: (props: IconProps) => ( 5 | 10 | 11 | 22 | 33 | 34 | ), 35 | twitter: (props: IconProps) => ( 36 | 37 | 42 | 43 | ), 44 | github: (props: IconProps) => ( 45 | 46 | 52 | 53 | ), 54 | linkedin: (props: IconProps) => ( 55 | 56 | 62 | 63 | ), 64 | instagram: (props: IconProps) => ( 65 | 66 | 72 | 73 | ), 74 | radix: (props: IconProps) => ( 75 | 76 | 80 | 81 | 87 | 88 | ), 89 | aria: (props: IconProps) => ( 90 | 91 | 96 | 97 | ), 98 | npm: (props: IconProps) => ( 99 | 100 | 106 | 107 | ), 108 | yarn: (props: IconProps) => ( 109 | 110 | 116 | 117 | ), 118 | pnpm: (props: IconProps) => ( 119 | 120 | 126 | 127 | ), 128 | react: (props: IconProps) => ( 129 | 130 | 136 | 137 | ), 138 | tailwind: (props: IconProps) => ( 139 | 140 | 146 | 147 | ), 148 | google: (props: IconProps) => ( 149 | 150 | 156 | 157 | ), 158 | apple: (props: IconProps) => ( 159 | 160 | 166 | 167 | ), 168 | paypal: (props: IconProps) => ( 169 | 170 | 176 | 177 | ), 178 | spinner: (props: IconProps) => ( 179 | 191 | 192 | 193 | ), 194 | }; 195 | --------------------------------------------------------------------------------