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

Preppin'. #45

Merged
merged 11 commits into from
Aug 26, 2023
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
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [require.resolve('./tooling/eslint-config/node.cjs')],
extends: [require.resolve('./tooling/eslint-config/node.js')],
ignorePatterns: ['apps/**', 'packages/**', 'tooling/**'],
parserOptions: {
tsconfigRootDir: __dirname,
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dist

.vercel
.env*
!.env.example

tsconfig.tsbuildinfo
.turbo
.turbo
87 changes: 87 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Contributor Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and
expression, level of experience, education, socio-economic status, nationality,
personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Attempting collaboration before conflict
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- Violence, threats of violence, or inciting others to commit self-harm
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, intentionally spreading misinformation, insulting/derogatory
comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Abuse of the reporting process to intentionally harass or exclude others
- Advocating for, or encouraging, any of the above behavior
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting us anonymously through
[the discord](https://discord.gg/trashdev). All complaints will be
reviewed and investigated and will result in a response that is deemed necessary
and appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

If you are unsure whether an incident is a violation, or whether the space where
the incident took place is covered by our Code of Conduct, **we encourage you to
still report it**. We would prefer to have a few extra reports where we decide
to take no action, than to leave an incident go unnoticed and unresolved that
may result in an individual or group to feel like they can no longer participate
in the community. Reports deemed as not a violation will also allow us to
improve our Code of Conduct and processes surrounding it. If you witness a
dangerous situation or someone in distress, we encourage you to report even if
you are only an observer.

## Attribution

This Code of Conduct is adapted from the
[Contributor Covenant](https://www.contributor-covenant.org/),
[version 1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Thank you for wanting to contribute! Instructions for contributing to Maestros can be found below.

## Code of Conduct

This project and everyone participating in it is governed by the Code of Conduct found in CONTRIBUTING.md. By participating, you are expected to uphold this code. Please report unacceptable behavior to anthony@shew.dev.

## Contributing with code

To get set up locally, you'll need to follow a few short steps:

1. Clone the repository.
2. Install packages.
3. Create a `.env.local` in `apps/maestros` using the `.env.example`

```
cp apps/maestros/.env.example apps/maestros/.env.local
```

### Always start with an issue

If you'd like to help with an existing issue, please mention that you'd like to be assigned before working on the issue so we can make sure we don't have multiple folks working on the same thing.

This guidance also applies if you'd like to contribute a major pull request. Communicate on an issue first to see if your work is likely to be accepted before working on large, "unknown-to-maintainers" pull requests.

## Reporting an issue

If you're running into problems with Maestros, feel free to let me know. You'll find a few guidelines below.

### First, is your issue an opinion?

The workflows, strategies, and practices in Maestros are a happy path that I (Anthony) have built up over time. There are many great tools with overlapping concerns that may or may not make it into Maestros. The goal is to provide the highest value happy path that I know of that is some balance of:

- Easy to explain
- Easy to use
- Powerful

We do have a "Tools" section where we run through specific tooling for specific use cases. When requesting something you have a big opinion about, be careful to follow these three guidelines.

This isn't to say that I think I have it all figured out. If you think there is some pain that we can resolve with the existing tooling that you see me recommending, feel free to give me a nudge!

### Filing an issue

Please follow the issue templates as closely as possible on this GitHub repo.
31 changes: 31 additions & 0 deletions apps/maestros/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# Created by Vercel CLI
GH_CLIENT_ID=""
GH_CLIENT_SECRET=""
NEXTAUTH_SECRET=""
NEXTAUTH_URL="http://localhost:3000"
NX_DAEMON=""
POSTGRES_DATABASE=""
POSTGRES_HOST=""
POSTGRES_PASSWORD=""
POSTGRES_PRISMA_URL=""
POSTGRES_URL=""
POSTGRES_URL_NON_POOLING=""
POSTGRES_USER=""
TURBO_REMOTE_ONLY=""
TURBO_RUN_SUMMARY=""
VERCEL="1"
VERCEL_ENV="development"
VERCEL_GIT_COMMIT_AUTHOR_LOGIN=""
VERCEL_GIT_COMMIT_AUTHOR_NAME=""
VERCEL_GIT_COMMIT_MESSAGE=""
VERCEL_GIT_COMMIT_REF=""
VERCEL_GIT_COMMIT_SHA=""
VERCEL_GIT_PREVIOUS_SHA=""
VERCEL_GIT_PROVIDER=""
VERCEL_GIT_PULL_REQUEST_ID=""
VERCEL_GIT_REPO_ID=""
VERCEL_GIT_REPO_OWNER=""
VERCEL_GIT_REPO_SLUG=""
VERCEL_URL=""
VERCEL_WEB_ANALYTICS_ID=""
2 changes: 1 addition & 1 deletion apps/maestros/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [require.resolve('@repo/lint/next.cjs')],
extends: [require.resolve('@repo/lint/next.js')],
parserOptions: {
tsconfigRootDir: __dirname,
project: `./tsconfig.json`,
Expand Down
12 changes: 0 additions & 12 deletions apps/maestros/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions apps/maestros/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const moduleExports = {
experimental: {
appDir: true,
},
// We do these in GitHub Actions checks so we don't do them here.
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },
};
Expand Down
1 change: 1 addition & 0 deletions apps/maestros/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dev": "next dev",
"format": "prettier . --check --cache --cache-location='node_modules/.cache/prettiercache'",
"format:fix": "prettier . --write --cache --cache-location='node_modules/.cache/prettiercache' --loglevel=warn",
"generate": "contentlayer build",
"lint": "eslint . --cache --cache-location 'node_modules/.cache/.eslintcache'",
"lint:fix": "eslint . --fix --cache --cache-location 'node_modules/.cache/.eslintcache'",
"spellcheck": "spellchecker --files '**/*.mdx' --dictionaries 'dictionary.txt' --no-suggestions --quiet",
Expand Down
1 change: 1 addition & 0 deletions apps/maestros/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
'../../packages/ui/src/components/**/*.{ts,tsx}',
],
theme: {
container: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "turbo build",
"checks": "turbo format lint typecheck --continue",
"checks:fix": "turbo format:fix lint:fix --continue",
"clean": "find . -name node_modules -o -name .next -o -name dist -type d -prune | xargs rm -rf",
"clean": "find . -name node_modules -o -name .next -o -name dist -o -name .contentlayer -type d -prune | xargs rm -rf",
"dev": "turbo dev",
"format": "prettier . \"!./apps/**\" \"!./packages/**\" \"!./tooling/**\" --check --cache --cache-location='node_modules/.cache/prettiercache' ",
"format:fix": "prettier . \"!./apps/**\" \"!./packages/**\" \"!./tooling/**\" --write --cache --cache-location='node_modules/.cache/prettiercache' --loglevel=warn",
Expand All @@ -18,7 +18,7 @@
"eslint": "^8.47.0",
"prettier": "^2.8.0",
"prettier-plugin-packagejson": "^2.4.3",
"turbo": "^1.10.12"
"turbo": "^1.10.13"
},
"packageManager": "pnpm@8.6.5",
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [require.resolve('@repo/lint/node.cjs')],
ignorePatterns: ['./src/components'],
extends: [require.resolve('@repo/lint/node.js')],
ignorePatterns: ['tsup.config.ts'],
parserOptions: {
tsconfigRootDir: __dirname,
project: `./tsconfig.json`,
Expand Down
10 changes: 7 additions & 3 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
"version": "0.1.0",
"private": true,
"exports": {
".": "./dist/index.js"
".": {
"types": "./src/index.tsx",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "tsc -b",
"dev": "tsc -w",
"build": "tsup",
"dev": "tsup --watch",
"format": "prettier . --check --cache --cache-location='node_modules/.cache/prettiercache'",
"format:fix": "prettier . --write --cache --cache-location='node_modules/.cache/prettiercache' --loglevel=warn",
"lint": "eslint . --cache --cache-location 'node_modules/.cache/.eslintcache'",
Expand All @@ -22,6 +25,7 @@
"@repo/lint": "workspace:*",
"@repo/tsconfig": "workspace:*",
"eslint": "^8.47.0",
"tsup": "^7.2.0",
"typescript": "^5.1.6"
}
}
13 changes: 13 additions & 0 deletions packages/analytics/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { execSync } from 'node:child_process';
import { Options, defineConfig } from 'tsup';

export default defineConfig((options: Options) => ({
entry: ['src/index.tsx'],
clean: true,
onSuccess: async () => {
execSync('tsc --emitDeclarationOnly');
},
splitting: true,
treeshake: true,
...options,
}));
4 changes: 2 additions & 2 deletions packages/db/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [require.resolve('@repo/lint/node.cjs')],
ignorePatterns: ['./src/components'],
extends: [require.resolve('@repo/lint/node.js')],
ignorePatterns: ['tsup.config.ts'],
parserOptions: {
tsconfigRootDir: __dirname,
project: `./tsconfig.json`,
Expand Down
12 changes: 8 additions & 4 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
"version": "0.1.1",
"private": true,
"exports": {
".": "./dist/index.js"
".": {
"types": "./src/index.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "tsc -b",
"build": "tsup",
"db:format": "prisma format",
"db:generate": "prisma generate",
"db:studio": "prisma studio",
"dev": "tsc -w",
"dev": "tsup --watch",
"format": "prettier . --check --cache --cache-location='node_modules/.cache/prettiercache'",
"format:fix": "prettier . --write --cache --cache-location='node_modules/.cache/prettiercache' --loglevel=warn",
"generate": "prisma generate",
"lint": "eslint . --cache --cache-location 'node_modules/.cache/.eslintcache'",
"lint:fix": "eslint . --fix --cache --cache-location 'node_modules/.cache/.eslintcache'",
"typecheck": "tsc --noEmit"
Expand All @@ -27,6 +30,7 @@
"eslint": "^8.47.0",
"prisma": "^5.2.0",
"ts-node": "10.9.1",
"tsup": "^7.2.0",
"typescript": "^5.1.6"
},
"prisma": {
Expand Down
13 changes: 13 additions & 0 deletions packages/db/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { execSync } from 'node:child_process';
import { Options, defineConfig } from 'tsup';

export default defineConfig((options: Options) => ({
entry: ['src/index.ts'],
clean: true,
onSuccess: async () => {
execSync('tsc --emitDeclarationOnly');
},
splitting: true,
treeshake: true,
...options,
}));
2 changes: 1 addition & 1 deletion packages/ui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [require.resolve('@repo/lint/node.cjs')],
extends: [require.resolve('@repo/lint/node.js')],
parserOptions: {
tsconfigRootDir: __dirname,
project: `./tsconfig.json`,
Expand Down
10 changes: 8 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
"#components/*": "./src/components/*"
},
"exports": {
".": "./dist/index.js",
"./server": "./dist/server.js"
".": {
"types": "./src/index.ts",
"default": "./dist/index.js"
},
"./server": {
"types": "./src/server.ts",
"default": "./dist/server.js"
}
},
"scripts": {
"build": "tsup",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ElementType } from 'react';
import type { NextLinkType } from '#utils/types';
import type { NextLinkType } from '../utils/types';

interface NavbarProps {
links: {
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/RepoCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Globe, ExternalLink } from 'lucide-icons-react';
import { Avatar, AvatarFallback, AvatarImage } from '#components/Avatar';
import { IconBox } from '#components/IconBox';
import { Avatar, AvatarFallback, AvatarImage } from './Avatar';
import { IconBox } from './IconBox';

const logos = {
kittr:
Expand Down
Loading