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

rewrite some part (not done) #1

Merged
merged 5 commits into from
Jun 6, 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
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
15 changes: 15 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DB_HOST=
DB_NAME=
DB_USER=
DB_PASS=
DB_PORT=
DB_CA="-----BEGIN CERTIFICATE-----
{YOUR_CERTIFICATE}
-----END CERTIFICATE-----"
CLOUDINARY_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
LOGFLARE_API_KEY=
LOGFLARE_SOURCE_TOKEN=
CLEAN_SESSIONS_SECRET=
UMAMI_ID=
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.js
*.js
*.mjs
*.cjs
9 changes: 7 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"root": true,
"extends": ["next/core-web-vitals", "prettier"]
"extends": "next/core-web-vitals",
"plugins": ["unused-imports"],
"rules": {
"no-unused-vars": "off", // or "@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": ["off"]
}
}
150 changes: 125 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,135 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# dependencies
/node_modules
/.pnp
.pnp.js
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# testing
/coverage
# Runtime data
pids
*.pid
*.seed
*.pid.lock

# next.js
/.next/
/out/
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# production
/build
# Coverage directory used by tools like istanbul
coverage
*.lcov

# misc
.DS_Store
*.pem
# nyc test coverage
.nyc_output

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# local env files
.env*.local
# Bower dependency directory (https://bower.io/)
bower_components

# vercel
.vercel
# node-waf configuration
.lock-wscript

# typescript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.DS_Store

# db ca
ca.pem
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*.js
.next/
.next/
11 changes: 10 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
{ "trailingComma": "es5", "tabWidth": 2, "useTabs": true, "printWidth": 190 }
{
"trailingComma": "es5",
"tabWidth": 2,
"printWidth": 120,
"semi": true,
"importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-classnames"]
}
28 changes: 28 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"[typescript]": {
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
}
},
"[typescriptreact]": {
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
}
},
"[css]": {
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

55 changes: 2 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,3 @@
<p align="center">
<a href="https://github.com/Dadangdut33/Personal-Web/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/Dadangdut33/Personal-Web"></a>
<a href="https://github.com/Dadangdut33/Personal-Web/pulls"><img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/Dadangdut33/Personal-Web"></a>
<br />
<a href="https://github.com/Dadangdut33/Personal-Web/stargazers"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/Dadangdut33/Personal-Web?style=social"></a>
<a href="https://github.com/Dadangdut33/Personal-Web/network/members"><img alt="GitHub forks" src="https://img.shields.io/github/forks/Dadangdut33/Personal-Web?style=social"></a>
</p>
# Readme

(packages is a little outdated, so it's currently in rebuild process)

Frontend of my personal web. Made using next.js. Take a look at [backend](https://github.com/Dadangdut33/Personal-Web-Backend) for server code.

# Table of Contents

- [Table of Contents](#table-of-contents)
- [Getting started](#getting-started)
- [Getting Started](#getting-started-1)
- [Learn More](#learn-more)
- [Deploy on Vercel](#deploy-on-vercel)

# Getting started

This project is bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). **IMPORTANT**, you need to use yarn to install or adding dependencies to avoid depndency conflicts. To start developing, first make sure that you have node and yarn installed. After that do `yarn install` to install all the dependencies. If you want to add new packages to the project, do `yarn add <package>`.

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
To be added
10 changes: 10 additions & 0 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { dbConfig } from "@/lib/db/utils";
import { defineConfig } from "drizzle-kit";

export default defineConfig({
schema: "./src/lib/db/schema",
out: "./drizzle/generated",
dialect: "postgresql",
dbCredentials: dbConfig as any, // it match but the type is not compatible
verbose: true,
});
Loading