Skip to content

chore(tcoui): init commit #473

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

Merged
merged 15 commits into from
May 14, 2025
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ apps/*/public/robots.txt

# test results
apps/*/test-results
.vercel
.env*.local
28 changes: 28 additions & 0 deletions apps/craft-of-ui/.cursor/rules/analytics.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
description: Analytics Usage
globs: *.ts, *.tsx
---
## Client-side Tracking
The `track` function in `@/utils/analytics.ts` is ONLY for tracking learner/customer activity.
This includes:
- Course progress
- Video watching
- Exercise completion
- Purchase activity
- User preferences

DO NOT use `track` for:
- Internal admin actions
- Content management
- System operations
- Backend processes

## Server-side Logging
Use `log` from `@/server/logger.ts` for:
- System operations
- Content management
- Error tracking
- Performance monitoring
- Backend processes

Always include relevant IDs and context in log messages.
8 changes: 8 additions & 0 deletions apps/craft-of-ui/.cursor/rules/component-system.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: use base React components when possible
globs: *.tsx
---
- you are an expert front end developer that likes reusable and composable component systems
- we keep our components in a package at the root of the monorepo /packages/ui
- our ui component library uses a shadcn style setup and radix under the hood
- most base components are represented
5 changes: 5 additions & 0 deletions apps/craft-of-ui/.cursor/rules/file-naming.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
description: use kebab case when naming files
globs: *.tsx, *.ts
---
- always use kebab-case when naming files
8 changes: 8 additions & 0 deletions apps/craft-of-ui/.cursor/rules/jsdoc-comments.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: add jsdoc comments to components and methods
globs: *.tsx, *.ts
---
- you are a senior developer that understands the need for strong documentation
- we add js doc comments to exported methods and React components
- we don't add a lot of bullshit comments inline, nobody needs that
- comments are primarily used for generated api documentation and typescript code hints
9 changes: 9 additions & 0 deletions apps/craft-of-ui/.cursor/rules/logging.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
description: serverside logging will be added where appropriate
globs: *.ts, *.tsx
---
[logger.ts](mdc:apps/ai-hero/src/server/logger.ts) is used in a serverside context, but not in client files

logging should be added where appropriate for server actions and server components

we use logging for general observability and debugging
2 changes: 2 additions & 0 deletions apps/craft-of-ui/.cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apps/epic-dev/src/utils/analytics.ts - use the `track` function for critical clientside analytics
apps/epic-dev/src/server/logger.ts - use log for server side logging and metrics
19 changes: 19 additions & 0 deletions apps/craft-of-ui/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## 🛠️ DEVELOPMENT 🛠️ ##

# General Metadata
NEXT_PUBLIC_APP_NAME="craft-of-ui"
NEXT_PUBLIC_SITE_TITLE="The Craft of UI"
NEXT_PUBLIC_SUPPORT_EMAIL="[email protected]"
NEXT_PUBLIC_PARTNER_FIRST_NAME="Jhey"
NEXT_PUBLIC_PARTNER_LAST_NAME="Tompkins"
NEXT_PUBLIC_PARTNER_TWITTER="jheytompkins"
NEXT_PUBLIC_SEO_KEYWORDS="UI development course, web interface implementation, frontend development skills, accessible web interfaces, UI engineering, performance optimization, web platform fundamentals, resilient user interfaces, frontend career advancement, modern browser APIs, UI problem-solving."
NEXT_PUBLIC_PRODUCT_DESCRIPTION="Improve Elevate your skill in building exceptional user interfaces with The Craft of UI. Create fast, accessible, and resilient web experiences using platform fundamentals that transform your development career"

# App Features
CREATE_USER_ON_LOGIN=true
LOG_VERIFICATION_URL=true
SKIP_EMAIL=false
SKIP_CK_TAGGING=true
DEFAULT_COUNTRY=US

19 changes: 19 additions & 0 deletions apps/craft-of-ui/.env.development.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Database
# Specify a custom URL if you want to connect to your own database
# DATABASE_URL="mysql://..."

# Next Auth
# You can generate a new secret on the command line with:
# openssl rand -base64 32
# https://next-auth.js.org/configuration/options#secret
NEXTAUTH_SECRET="set-secret-here"

# for webhooks use ngrok or similar for stable DNS accessible URL
NEXTAUTH_URL="https://some-subdomain.ngrok-free.app/api/auth"
COURSEBUILDER_URL="https://some-subdomain.ngrok-free.app"
UPLOADTHING_URL="https://some-subdomain.ngrok-free.app"
NEXT_PUBLIC_URL="https://some-subdomain.ngrok-free.app"

# Github
GITHUB_CLIENT_ID="github-client-id"
GITHUB_CLIENT_SECRET="github-client-secret"
139 changes: 139 additions & 0 deletions apps/craft-of-ui/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.

# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.

# When adding additional environment variables, the schema in "/src/env.mjs"
# should be updated accordingly.

NEXT_PUBLIC_APP_NAME=app-name
NEXT_PUBLIC_SITE_TITLE="the site"
[email protected]

COURSEBUILDER_URL="http://example.com"

# Drizzle
# Get the Database URL from the "prisma" dropdown selector in PlanetScale
# Change the query params at the end of the URL to "?ssl={"rejectUnauthorized":true}"
DATABASE_URL='mysql://{USERNAME}:{PASSWORD}@aws.connect.psdb.cloud/{DATABASE_NAME}?ssl={"rejectUnauthorized":true}'

#Discord
DISCORD_CLIENT_ID=0
DISCORD_CLIENT_SECRET=secret
DISCORD_BOT_TOKEN=token
DISCORD_GUILD_ID=0
DISCORD_MEMBER_ROLE_ID=0
DISCORD_PURCHASER_ROLE_ID=0

#Stripe
STRIPE_SECRET_TOKEN="sk_test_"
STRIPE_WEBHOOK_SECRET="whs_"

# Next Auth
# You can generate a new secret on the command line with:
# openssl rand -base64 32
# https://next-auth.js.org/configuration/options#secret
NEXTAUTH_SECRET="YOUR_SECRET"

# for webhooks use ngrok or similar for stable DNS accessible URL
NEXTAUTH_URL="SITE_URL/api/auth"
UPLOADTHING_URL="SITE_URL"
NEXT_PUBLIC_URL="SITE_URL"

# Pinecone
PINECONE_API_KEY="pinecone-key"
PINECONE_ENVIRONMENT="pinecone-environment"
PINECONE_INDEX="pinecone-index"

# Postmark
POSTMARK_API_KEY="sk_xxx"
POSTMARK_WEBHOOK_SECRET="whs_xxx"

# Replicate
REPLICATE_API_KEY="r8_xxx"

# Anthropic
ANTHROPIC_API_KEY="sk-ant-api03-xxx"


# OpenAI Credentials to access gpt-4
OPENAI_API_KEY="sk_xxx"
OPENAI_MODEL_ID="gpt-4o-2024-08-06"

# Sanity
SANITY_STUDIO_PROJECT_ID="YOUR_PROJECT_ID"
SANITY_STUDIO_DATASET="production"
SANITY_STUDIO_API_VERSION="2023-10-03"
SANITY_API_TOKEN="sk_xxx"

# Inngest
INNGEST_EVENT_KEY="ek_xxx"
INNGEST_SIGNING_KEY="sk_xxx"

# Mux
MUX_ACCESS_TOKEN_ID="YOUR_TOKEN_ID"
MUX_SECRET_KEY="sk_xxx"

# Github
GITHUB_CLIENT_ID="YOUR_CLIENT_ID"
GITHUB_CLIENT_SECRET="sk_xxx"

# PartyKit
NEXT_PUBLIC_PARTY_KIT_URL="http://127.0.0.1:1999"
NEXT_PUBLIC_PARTYKIT_ROOM_NAME="gpt-4-chain"

# DEEPGRAM
DEEPGRAM_API_KEY="sk_xxx"

# Uploadthing
UPLOADTHING_SECRET="sk_xxx"
UPLOADTHING_APP_ID="YOUR_APP_ID"

# Cloudinary
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="YOUR_CLOUD_NAME"
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET="YOUR_UPLOAD_PRESET"

#Twitter
TWITTER_API_KEY=""
TWITTER_API_SECRET=""
TWITTER_BEARER_TOKEN=""
TWITTER_USER_ID=""

# Upstash
UPSTASH_REDIS_REST_URL="UPSTASH_REDIS_REST_URL"
UPSTASH_REDIS_REST_TOKEN="UPSTASH_REDIS_REST_TOKEN"

# RESEND
RESEND_API_KEY="re_xxx"

#AWS Image Uploading
AWS_REGION="us-east-1"
AWS_ACCESS_KEY_ID="YOUR_ACCESS"
AWS_SECRET_ACCESS_KEY="YOUR_SECRET"
AWS_BUCKET_NAME="BUCKET_NAME"

# Convertkit

CONVERTKIT_API_SECRET="API_SECRET"
CONVERTKIT_API_KEY="API_KEY"
CONVERTKIT_SIGNUP_FORM="FORM_ID"

# Discord

NEXT_PUBLIC_DISCORD_INVITE_URL="DISCORD_INVITE_URL"

# Cloudinary
CLOUDINARY_API_KEY="CLOUDINARY_API_KEY"
CLOUDINARY_API_SECRET="CLOUDINARY_API_SECRET"

# Typesense
TYPESENSE_WRITE_API_KEY="TYPESENSE_WRITE_API_KEY"
TYPESENSE_COLLECTION_NAME="content_production"
NEXT_PUBLIC_TYPESENSE_HOST="TYPESENSE_HOST"
NEXT_PUBLIC_TYPESENSE_API_KEY="TYPESENSE_API_KEY"
NEXT_PUBLIC_TYPESENSE_PORT="443"

AXIOM_TOKEN=any-token
13 changes: 13 additions & 0 deletions apps/craft-of-ui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type {import("eslint").Linter.Config} */
const config = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
extends: ['next/core-web-vitals'],
rules: {
'react/no-unescaped-entities': 'off',
},
}

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

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

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

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

# production
/build
.env.production

# misc
.DS_Store
*.pem
/.idea/
.sanity/
.partykit/
.turbo/
dist/
.react-email/

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

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

# vercel
.vercel

# typescript
*.tsbuildinfo

# Sentry Config File
.env.sentry-build-plugin
26 changes: 26 additions & 0 deletions apps/craft-of-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# craft-of-ui

## 0.1.1

### Patch Changes

- Updated dependencies
[[`355cb64`](https://github.com/badass-courses/course-builder/commit/355cb64a678034fa02f96a05adc469276ab673ac),
[`08b5baf`](https://github.com/badass-courses/course-builder/commit/08b5baf69d334a360db177154e347122be4e6ad1),
[`75dedab`](https://github.com/badass-courses/course-builder/commit/75dedabbdb956a1b968a7fe94d3ab7f6af9d1cc0),
[`0b7589f`](https://github.com/badass-courses/course-builder/commit/0b7589f74d25507795343b90026ff7f8f13becb4),
[`4a7a143`](https://github.com/badass-courses/course-builder/commit/4a7a1432b5b3c97d730115178d2c3938e15cb7ab),
[`7a10553`](https://github.com/badass-courses/course-builder/commit/7a105531deaca25b27108ee4308d97900dc154e2),
[`355cb64`](https://github.com/badass-courses/course-builder/commit/355cb64a678034fa02f96a05adc469276ab673ac),
[`3806be5`](https://github.com/badass-courses/course-builder/commit/3806be5e893ce6418a8157976da0747a438680c3),
[`25e2fde`](https://github.com/badass-courses/course-builder/commit/25e2fde7ee902569728e9f936298126c72efb9ae),
[`af9b3af`](https://github.com/badass-courses/course-builder/commit/af9b3af0b42f3248dc442a089616005eeaef8ecc),
[`596b298`](https://github.com/badass-courses/course-builder/commit/596b2980a8485adc2bc5331b527d47b89c095776)]:
- @coursebuilder/[email protected]
- @coursebuilder/[email protected]
- @coursebuilder/[email protected]
- @coursebuilder/[email protected]
- @coursebuilder/[email protected]
- @coursebuilder/[email protected]
- @coursebuilder/[email protected]
- @coursebuilder/[email protected]
Loading
Loading