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

[Major Upgrade] RSC & Rewrite Project #680

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 0 additions & 1 deletion .env.development

This file was deleted.

14 changes: 10 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Server
CLOUDINARY_API_KEY = 'xxxx'
CLOUDINARY_API_SECRET = 'xxxx'
SECRET_KEY = 'xxxx'
# Server Environment
DB_HOST = xxx.xxx.xxx
DB_USER = xxx
DB_PASSWORD = xxx
DB_NAME = xxx
SECRET_APP_KEY = xxxxxx
CLOUDINARY_API_KEY = xxxx
CLOUDINARY_API_SECRET = xxxx

# Frontend Environment (prefix: `NEXT_PUBLIC_`)
1 change: 0 additions & 1 deletion .env.production

This file was deleted.

86 changes: 86 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
module.exports = {
'parser': '@typescript-eslint/parser',
'plugins': [
'@typescript-eslint'
],
'extends': [
'next',
'next/core-web-vitals',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
'rules': {
'semi': ['error', 'always'],
'indent': ['error', 2, { 'SwitchCase': 1 }],
'comma-dangle': ['error', 'never'],
'comma-spacing': ['error', { 'before': false, 'after': true }],
'space-before-blocks': 'error',
'no-multiple-empty-lines': ['error', { 'max': 1 }],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': 'error',
'keyword-spacing': 'error',
'arrow-spacing': 'error',
'space-infix-ops': 'error',
'no-console': 'warn',
'no-useless-catch': 'off',
'jsx-quotes': ['error', 'prefer-double'],
'space-in-parens': ['error', 'never'],
'space-before-function-paren': ['error', 'never'],
'react/jsx-wrap-multilines': ['error', {
'declaration': 'parens-new-line',
'assignment': 'parens-new-line',
'return': 'parens-new-line',
'arrow': 'parens-new-line',
'condition': 'parens-new-line',
'logical': 'ignore',
'prop': 'ignore'
}],

/** @see https://medium.com/weekly-webtips/how-to-sort-imports-like-a-pro-in-typescript-4ee8afd7258a */
'import/no-unresolved': 'error',
'import/order': [
'error',
{
'groups': [
'builtin',
'external',
'internal',
['sibling', 'parent'],
'index',
'unknown'
],
'newlines-between': 'always',
'alphabetize': {
'order': 'asc',
'caseInsensitive': true
}
}
],
/** */

'@typescript-eslint/semi': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/space-before-blocks': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/member-delimiter-style': ['error', {
'multiline': {
'delimiter': 'semi',
'requireLast': true
},
'singleline': {
'delimiter': 'semi',
'requireLast': true
},
'multilineDetection': 'brackets'
}],
'@typescript-eslint/quotes': [
'error',
'single',
{
'allowTemplateLiterals': true
}
]
}
};
55 changes: 0 additions & 55 deletions .eslintrc.json

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,3 @@ jobs:
- name: Start Linting
run: |
npm run lint

test:
name: Unit Test
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Load node_modules
uses: actions/cache@v1
with:
path: node_modules
key: node_modules-${{ github.event.pull_request.head.sha }}
- name: Start Unit Testing
run: |
npm run test:unit
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Environment Variables
.env

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage
report.json

# next.js
/.next/
Expand All @@ -30,6 +26,7 @@ yarn-error.log*
.pnpm-debug.log*

# local env files
.env
.env*.local

# vercel
Expand All @@ -39,8 +36,4 @@ yarn-error.log*
*.tsbuildinfo

# Auto generated build file
/public/rss
/public/robots.txt
/public/sitemap.xml
/public/sitemap-*.xml*
*.generated.*
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Gading Nasution.
Copyright (c) 2023 Gading Nasution.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next

* * *

Copyright © 2022 by Sutan Gading Fadhillah Nasution
Copyright © 2023 by Sutan Gading Fadhillah Nasution
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions src/contents/portfolio/en.ts → contents/portfolio/en.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Portfolio } from '@/types/contents';
import { AUTHOR_GITHUB } from '@/configs/env';
const AUTHOR_GITHUB = 'gadingnst';

const portfolio: Portfolio[] = [
const portfolio = [
{
name: 'SWR Global State',
category: 'Utility Project',
Expand Down
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions daisy.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const darkTheme = require('./design/theme/dark');
const lightTheme = require('./design/theme/light');

/**
* @see https://daisyui.com/docs/config/
*/
module.exports = {
themes: [
lightTheme,
darkTheme
],
prefix: '', // prefix for daisyUI classnames (components, modifiers and responsive class names. Not colors)
base: true, // applies background color and foreground color for root element by default
styled: true, // include daisyUI colors and design decisions for all components
utils: true, // adds responsive and modifier utility classes
rtl: false, // rotate style direction from left-to-right to right-to-left. You also need to add dir="rtl" to your html tag and install `tailwindcss-flip` plugin for Tailwind CSS.
logs: false // Shows info about daisyUI version and used config in the console when building your CSS
};
55 changes: 55 additions & 0 deletions design/keyframes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/** @see https://tailwindcss.com/docs/animation */
const keyframes = {
'scale': {
'0%': {
opacity: 0,
transform: 'scale(0.8)'
},
'100%': {
opacity: 1,
transform: 'scale(1)'
}
},
'from-t-25': {
from: {
opacity: 0,
transform: 'translate(0, -25px)'
},
to: {
opacity: 1,
transform: 'translate(0)'
}
},
'from-r-25': {
from: {
opacity: 0,
transform: 'translate(25px, 0)'
},
to: {
opacity: 1,
transform: 'translate(0)'
}
},
'from-b-25': {
from: {
opacity: 0,
transform: 'translate(0, 25px)'
},
to: {
opacity: 1,
transform: 'translate(0)'
}
},
'from-l-25': {
from: {
opacity: 0,
transform: 'translate(-25px, 0)'
},
to: {
opacity: 1,
transform: 'translate(0)'
}
}
};

module.exports = keyframes;
26 changes: 26 additions & 0 deletions design/tailwind.custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const plugin = require('tailwindcss/plugin');

const stylePlugins = plugin(({ addUtilities, theme }) => {
addUtilities({
'.base-container': {
width: theme('width.full'),
maxWidth: theme('maxWidth.6xl'),
paddingLeft: theme('spacing.4'),
paddingRight: theme('spacing.4'),
marginLeft: 'auto',
marginRight: 'auto'
},
'.text-shadow': {
textShadow: '2px 2px 15px #000'
},
'.text-shadow-white': {
textShadow: '2px 2px 15px #FFF'
},
'.text-shadow-none': {
textShadow: 'none'
}
});
});

module.exports = stylePlugins;
19 changes: 19 additions & 0 deletions design/theme/base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const baseTheme = {
'primary': '#5e72e4',
'primary-content': '#ffffff',
'secondary': '#ff50a5',
'secondary-content': '#ffffff',
'accent': '#b89bff',
'accent-content': '#ffffff',
'info': '#11cdef',
'info-content': '#ffffff',
'success': '#2dce89',
'success-content': '#ffffff',
'warning': '#fb6340',
'warning-content': '#ffffff',
'error': '#f5365c',
'error-content': '#ffffff',
'neutral': '#a1a1a3'
};

module.exports = baseTheme;
18 changes: 18 additions & 0 deletions design/theme/dark.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const baseTheme = require('./base');

const darkTheme = {
dark: {
...baseTheme,
'base-100': '#0e263a',
'base-200': '#0f2d44',
'base-300': '#282f5e',
'base-content': '#ffffff',
'.header-primary': {
backgroundColor: '#282f5e',
color: '#ffffff'
}
}
};

module.exports = darkTheme;
Loading
Loading