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

Shadify #150

Merged
merged 32 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c430c67
add shadcdn ui and port badge
MaxLeiter Jun 5, 2023
a4e80ab
button
MaxLeiter Jun 5, 2023
c76e2ec
dropdown
MaxLeiter Jun 5, 2023
24cf4a7
cards
MaxLeiter Jun 5, 2023
2c62818
cmdk
MaxLeiter Jun 5, 2023
6917b81
tabs, textarea
MaxLeiter Jun 5, 2023
b488e3f
improvements
MaxLeiter Jun 5, 2023
86dcfed
progress
MaxLeiter Jun 5, 2023
ea0e157
port requires-passcode
MaxLeiter Jun 5, 2023
8673aaf
ignore eslint/ts errors during preview/dev deploy
MaxLeiter Jun 5, 2023
f491958
ignore eslint/ts errors during preview/dev deploy
MaxLeiter Jun 5, 2023
d30b667
markdown improvements
MaxLeiter Jun 6, 2023
d525820
bump prisma
MaxLeiter Jun 6, 2023
629f9e3
fix NEXT_PUBLIC_DRIFT_URL support on vercel
MaxLeiter Jun 6, 2023
ff6014a
post list fixes, list skeletons, migrate date picker to shadui
MaxLeiter Jul 11, 2023
817852a
Use tailwind for documents
MaxLeiter Jul 16, 2023
dcf9c99
Styling adjustmnets, fix pages feature, replace styles with tw
MaxLeiter Jul 16, 2023
631fad9
Prettier
MaxLeiter Jul 16, 2023
bb3cceb
Fix building
MaxLeiter Jul 16, 2023
c240f05
Fix some dark mode styles, make post view a card
MaxLeiter Jul 17, 2023
025d445
rm lucide react
MaxLeiter Jul 17, 2023
707c324
modularize imports react-feather
MaxLeiter Jul 17, 2023
11d59d0
Fix github import
MaxLeiter Jul 17, 2023
46725f7
Fix DRIFT_URL
MaxLeiter Jul 17, 2023
da6d576
Fix getting host in fetch-with-user
MaxLeiter Jul 17, 2023
2a98c39
bump next, try router.refresh for signin
MaxLeiter Jul 18, 2023
5768bb6
fix next_public_drift_url
MaxLeiter Jul 18, 2023
e9c8499
delete post
MaxLeiter Jul 19, 2023
d4b1fbc
Visibility control improvements, admin cleanup
MaxLeiter Jul 21, 2023
c194318
Lint
MaxLeiter Jul 21, 2023
1a15089
Fix post list icons in light mode
MaxLeiter Jul 21, 2023
53603f6
Footer
MaxLeiter Jul 21, 2023
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
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"trailingComma": "none",
"singleQuote": false,
"printWidth": 80,
"useTabs": true
"useTabs": true,
"plugins": ["prettier-plugin-tailwindcss"]
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ You can try a demo at https://drift.lol. The demo is built on main but has no da

If you want to contribute, need support, or want to stay updated, you can join the IRC channel at #drift on irc.libera.chat or [reach me on twitter](https://twitter.com/Max_Leiter). If you don't have an IRC client yet, you can use a webclient [here](https://demo.thelounge.chat/#/connect?join=%23drift&nick=drift-user&realname=Drift%20User).

Drift is built with Next.js 13, React Server Components, [shadcn/ui](https://github.com/shadcn/ui), and [Prisma](https://prisma.io/).

<hr />

**Contents:**
Expand Down Expand Up @@ -48,6 +50,7 @@ You can change these to your liking.
- `NODE_ENV`: defaults to development, can be `production`

#### Auth environment variables

**Note:** Only credential auth currently supports the registration password, so if you want to secure registration, you must use only credential auth.

- `GITHUB_CLIENT_ID`: the client ID for GitHub OAuth.
Expand Down
16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "app/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "@components",
"utils": "@utils"
}
}
27 changes: 23 additions & 4 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,36 @@ const nextConfig = {
{
source: "/file/raw/:id",
destination: `/api/raw/:id`
},
{
source: "/signout",
destination: `/api/auth/signout`
}
]
},
images: {
domains: ["avatars.githubusercontent.com"]
},
env: {
NEXT_PUBLIC_DRIFT_URL: process.env.DRIFT_URL
NEXT_PUBLIC_DRIFT_URL:
process.env.DRIFT_URL ||
(process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: "http://localhost:3000")
},
eslint: {
ignoreDuringBuilds: process.env.VERCEL_ENV !== "production"
},
typescript: {
ignoreBuildErrors: process.env.VERCEL_ENV !== "production"
},
modularizeImports: {
"react-feather": {
transform: "react-feather/dist/icons/{{kebabCase member}}"
}
}
}

export default bundleAnalyzer({ enabled: process.env.ANALYZE === "true" })(
nextConfig
)
export default process.env.ANALYZE === "true"
? bundleAnalyzer({ enabled: true })(nextConfig)
: nextConfig
32 changes: 22 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,48 @@
"jest": "jest"
},
"dependencies": {
"@next-auth/prisma-adapter": "^1.0.6",
"@next/eslint-plugin-next": "13.4.4-canary.0",
"@prisma/client": "^4.14.1",
"@next-auth/prisma-adapter": "^1.0.7",
"@next/eslint-plugin-next": "13.4.11-canary.0",
"@prisma/client": "^5.0.0",
"@radix-ui/react-alert-dialog": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.3",
"@radix-ui/react-dropdown-menu": "^2.0.4",
"@radix-ui/react-navigation-menu": "^1.1.3",
"@radix-ui/react-popover": "^1.0.5",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.5",
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
"@tailwindcss/typography": "^0.5.9",
"class-variance-authority": "^0.6.0",
"client-only": "^0.0.1",
"client-zip": "2.3.1",
"cmdk": "^0.2.0",
"date-fns": "^2.30.0",
"jest": "^29.5.0",
"lodash.debounce": "^4.0.8",
"next": "13.4.5-canary.2",
"next-auth": "^4.22.1",
"next": "13.4.11-canary.1",
"next-auth": "^4.22.3",
"next-themes": "^0.2.1",
"react": "18.2.0",
"react-cookie": "^4.1.1",
"react-datepicker": "4.10.0",
"react-day-picker": "^8.8.0",
"react-dom": "18.2.0",
"react-dropzone": "14.2.3",
"react-error-boundary": "^4.0.4",
"react-feather": "^2.0.10",
"react-hot-toast": "2.4.1",
"server-only": "^0.0.1",
"swr": "^2.1.5",
"swr": "^2.2.0",
"tailwind-merge": "^1.13.0",
"tailwindcss-animate": "^1.0.5",
"textarea-markdown-editor": "1.0.4",
"ts-jest": "^29.1.0",
"uuid": "^9.0.0"
},
"devDependencies": {
"@next/bundle-analyzer": "13.4.5-canary.2",
"@next/bundle-analyzer": "13.4.11-canary.0",
"@total-typescript/ts-reset": "^0.4.2",
"@types/bcrypt": "^5.0.0",
"@types/git-http-backend": "^1.0.1",
Expand All @@ -59,12 +68,13 @@
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"@wcj/markdown-to-html": "^2.2.1",
"autoprefixer": "^10.4.14",
"clsx": "^1.2.1",
"cross-env": "7.0.3",
"csstype": "^3.1.2",
"dotenv": "^16.0.3",
"eslint": "8.38.0",
"eslint-config-next": "13.4.5-canary.2",
"eslint-config-next": "13.4.11-canary.1",
"jest-mock-extended": "^3.0.3",
"next-unused": "0.0.6",
"postcss": "^8.4.21",
Expand All @@ -73,8 +83,10 @@
"postcss-nested": "^6.0.1",
"postcss-preset-env": "^8.4.1",
"prettier": "2.8.7",
"prisma": "^4.12.0",
"typescript": "5.0.4",
"prettier-plugin-tailwindcss": "^0.3.0",
"prisma": "^5.0.0",
"tailwindcss": "^3.3.2",
"typescript": "5.1.6",
"typescript-plugin-css-modules": "5.0.1"
},
"optionalDependencies": {
Expand Down
Loading