Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: de-monorepo #19

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json.schemastore.org/eslintrc",
"root": true,
"extends": [
"next/core-web-vitals",
"prettier",
"plugin:tailwindcss/recommended"
],
"plugins": ["tailwindcss"],
"rules": {
"tailwindcss/no-custom-classname": "off",
"tailwindcss/classnames-order": "off",
"tailwindcss/enforces-shorthand": "off"
},
"settings": {
"tailwindcss": {
"callees": ["cn", "cva"],
"config": "tailwind.config.js"
}
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser"
}
]
}
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
types: [opened, synchronize]

Expand All @@ -11,11 +11,6 @@ jobs:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest
# To use Remote Caching, uncomment the next lines and follow the steps below.
# env:
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
# TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -30,7 +25,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache: 'pnpm'

- name: Install dependencies
run: pnpm install
Expand Down
50 changes: 24 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
node_modules
.pnp
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# testing
/coverage

# Testing
coverage
# next.js
/.next/
/out/

# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
.next/
out/
build
dist
# production
/build

# misc
.DS_Store
*.pem

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

# Misc
.DS_Store
*.pem
# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
38 changes: 1 addition & 37 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,6 @@
Thank you for considering contributing to Swolo! This document outlines the
process for contributing to this project.

## About this repository

This repository is a monorepo.

- [pnpm](https://pnpm.io) and [`workspaces`](https://pnpm.io/workspaces) are used for development.
- [Turborepo](https://turbo.build/repo) is the build system, with `@repo` for internal packages.
- (_planned_) [changesets](https://github.com/changesets/changesets) will be used for managing releases.

## Structure

This repository is structured as follows:

| Path | Description |
| ----------------------------- | ------------------------------------------------------------------------------------ |
| `apps/web` | The Next.js application for the Swolo website |
| `packages/core` | Core functionality, such as routes, shared by the applications |
| `packages/ui` | A React component library shared by the applications |
| `packages/eslint-config` | `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) |
| `packages/tailwind-config` | `tailwind.config` for importing into presets of local `tailwind.config.ts` files |
| `packages/typescript-config ` | `tsconfig.json`s used throughout the monorepo |

## Development

### Clone on your local machine
Expand Down Expand Up @@ -53,22 +32,7 @@ The `pnpm dev:` scripts are used to start the development process for a workspac
To run the Swolo website:

```bash
pnpm dev:web
```

### Managing dependencies

When adding dependencies, follow Turbo's [Best practices for dependency installation](https://turbo.build/repo/docs/crafting-your-repository/managing-dependencies#best-practices-for-dependency-installation):

> Install dependencies where they're used. When you install a dependency in your repository, you should install it directly in the package that uses it. The package's package.json will have every dependency that the package needs. This is true for both external and internal dependencies.

### Versioning dependencies

As a rule, keep dependencies on the same version across all packages. Use
`pnpm up` to update dependency versions in one command. For example:

```bash
pnpm up --recursive typescript@latest
pnpm dev
```

## Commit convention
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Inspired by the
[Getting Things Done](https://en.wikipedia.org/wiki/Getting_Things_Done)
methodology and Ben Solo's iconic shirtless scene, Swolo is a cross-platform
methodology and Ben Solo's iconic shirtless scene, Swolo is a
**project management and note-taking app** designed for a party of one.

Capture tasks, manage projects, and take notes with confidence — just like Ben,
Expand All @@ -12,10 +12,12 @@ you're swol enough to handle anything your workload throws at you.

## Guiding principles

- **Effortless capture** — Quickly capture tasks and ideas, clearing your mind of distractions for later processing.
- **Work anywhere** — Access your content seamlessly from the web or desktop, whether you're online or offline.
- **Frictionless task setup** — Start tasks from anywhere, even while taking notes, to keep your workflow smooth.
- **Label all the things** — Tag your tasks and notes for easy searching and organization.
- **Effortless capture** — Quickly capture tasks and ideas, clearing your mind
of distractions for later processing.
- **Frictionless task setup** — Start tasks from anywhere, even while taking
notes, to keep your workflow smooth.
- **Label all the things** — Tag your tasks and notes for easy searching and
organization.
- **Full data control** — Export your data at anytime.

## Contributing
Expand All @@ -40,4 +42,4 @@ Licensed under the [MIT license](https://github.com/shadcn/ui/blob/main/LICENSE.

<br/>

![Ben Swolo meme](./img/do-you-even.png)
![Ben Swolo meme](./docs/img/do-you-even.png)
File renamed without changes.
File renamed without changes.
File renamed without changes.
78 changes: 78 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
font-family: Arial, Helvetica, sans-serif;
}

@layer utilities {
.text-balance {
text-wrap: balance;
}
}

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 0 0% 3.9%;
--card: 0 0% 100%;
--card-foreground: 0 0% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 3.9%;
--primary: 0 0% 9%;
--primary-foreground: 0 0% 98%;
--secondary: 0 0% 96.1%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
--accent: 0 0% 96.1%;
--accent-foreground: 0 0% 9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 89.8%;
--input: 0 0% 89.8%;
--ring: 0 0% 3.9%;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
--radius: 0.5rem;
}
.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
--card: 0 0% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 0 0% 9%;
--secondary: 0 0% 14.9%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
--accent: 0 0% 14.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%;
--input: 0 0% 14.9%;
--ring: 0 0% 83.1%;
--chart-1: 220 70% 50%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
File renamed without changes.
38 changes: 38 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
'use client';

import { ActionBar } from '@/components/ui/shell/action-bar';
import { Main } from '@/components/ui/shell/main';
import { Shell } from '@/components/ui/shell/shell';
import { Toolbar } from '@/components/ui/toolbar';
import localFont from 'next/font/local';
import { useRouter } from 'next/navigation';
import './globals.css';

const geistSans = localFont({
src: './_fonts/GeistVF.woff',
variable: '--font-geist-sans',
});
const geistMono = localFont({
src: './_fonts/GeistMonoVF.woff',
variable: '--font-geist-mono',
});

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const router = useRouter();

return (
<html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable}`}>
<Shell>
<Toolbar />
<ActionBar onNavigate={(path) => router.push(path)}></ActionBar>
<Main>{children}</Main>
</Shell>
</body>
</html>
);
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions apps/web/.eslintrc.js

This file was deleted.

36 changes: 0 additions & 36 deletions apps/web/.gitignore

This file was deleted.

Loading