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

Update major #38

Merged
merged 44 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2f7a292
feat: from scratch
reacto11mecha May 8, 2024
e2d8375
fix: menambahkan file yang hilang
reacto11mecha May 8, 2024
1c0b5e3
chore: prettier
May 9, 2024
8ca6a7a
fix: menghapus planetscale
May 10, 2024
b112e16
fix: menyesuaikan skema dengan versi prisma
reacto11mecha May 10, 2024
3a671be
feat: rename, mengikuti spec yang lama
reacto11mecha May 11, 2024
b2ab136
fix: menghilangkan semua yang berkaitan dengan edge runtime
reacto11mecha May 17, 2024
912cf57
feat: menambahkan font sunda
reacto11mecha May 17, 2024
5f39878
feat: menambahkan halaman login dan registrasi (permulaan)
reacto11mecha May 20, 2024
defc259
feat: menambahkan fungsionalitas login dan registrasi
reacto11mecha May 21, 2024
c2aebad
feat: menambahkan fitur login dan logout
reacto11mecha Jun 5, 2024
d933e83
fix: memperbaiki turbo generator yang tidak sesuai dengan yarn
reacto11mecha Jun 6, 2024
24e87cc
feat: mengembalikan settings
reacto11mecha Jun 6, 2024
99667b5
chore: update versi
reacto11mecha Jun 10, 2024
d7c5833
feat: menambahkan toggle masih bisa login
reacto11mecha Jun 10, 2024
3547fa1
feat: persiapan penambahan halaman baru
reacto11mecha Jun 10, 2024
cbd8d41
fix: merapihkan tampilan
reacto11mecha Jun 10, 2024
3f2f8b4
feat: menambahkan halaman partisipan
reacto11mecha Jun 10, 2024
8878b85
feat: menambahkan fitur approve user
reacto11mecha Jun 10, 2024
64768a3
feat: menambahkan fungsi ubah role
reacto11mecha Jun 10, 2024
2ae63b8
feat: persiapan halaman pengaturan
reacto11mecha Jun 10, 2024
eaf0d3c
feat: menambahkan fungsi atur perilaku
reacto11mecha Jun 11, 2024
9e64c6e
feat: menambahkan fungsionalitas pengaturan durasi
reacto11mecha Jun 11, 2024
af10c01
feat: persiapan halaman partisipan
reacto11mecha Jun 11, 2024
652a783
feat: fitur qr dadakan
reacto11mecha Jun 11, 2024
15a7fb3
feat: masih membuat tabel partisipan
reacto11mecha Jun 11, 2024
5f67806
feat: menambahkan tabel, memperbaiki style, dll
reacto11mecha Jun 12, 2024
f377e93
feat: menambahkan fungsionalitas tambah peserta banyak dengan csv
reacto11mecha Jun 12, 2024
aa1feec
feat: menambahkan fitur export
reacto11mecha Jun 12, 2024
82146ff
feat: fitur ubah identitas peserta
reacto11mecha Jun 12, 2024
7a8b7b7
feat: fitur hapus peserta
reacto11mecha Jun 12, 2024
3cda5b2
style: menambahkan warna pada icon
reacto11mecha Jun 12, 2024
93619ee
feat: tambah kandidat
reacto11mecha Jun 14, 2024
5a860f7
feat: tambah kandidat
reacto11mecha Jun 14, 2024
a152dc8
feat: edit kandidat
reacto11mecha Jun 14, 2024
0393f3c
feat: hapus kandidat
reacto11mecha Jun 14, 2024
f7f87a6
feat: statistik esensial
reacto11mecha Jun 14, 2024
42a346f
feat: navbar yang dapat di persist
reacto11mecha Jun 14, 2024
755815b
feat: menambahkan grafik pada halaman statistik
reacto11mecha Jun 14, 2024
3dae1ae
feat: menambahkan presentasi pemilih
reacto11mecha Jun 15, 2024
8b4a00e
feat: nanti dulu
reacto11mecha Jun 16, 2024
19ba794
feat: menambahkan ci
reacto11mecha Jun 16, 2024
194d7da
fix: memperbaiki nama direktori yang salah
reacto11mecha Jun 16, 2024
5a82b4b
fix: lockfile
reacto11mecha Jun 16, 2024
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
  •  
  •  
  •  
165 changes: 0 additions & 165 deletions .circleci/config.yml

This file was deleted.

37 changes: 14 additions & 23 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
# 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`.
# Since .env is gitignored, you can use .env.example 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.
# 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.

# Prisma
# https://www.prisma.io/docs/reference/database-reference/connection-urls#env
DATABASE_URL="mysql://usrnm:pw@localhost:3306/sora"
# The database URL is used to connect to your PlanetScale database.
DB_HOST='localhost'
DB_NAME='sora'
DB_USERNAME=''
DB_PASSWORD=''

# 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=""
NEXTAUTH_URL="http://localhost:3000"

# RabbitMQ
# This env variable will connect to rabbitmq instance
AMQP_URL="amqp://localhost"

# TRPC Endpoint
# This env variable will tell the vote processor where is the trpc endpoint
TRPC_URL="http://localhost:3000/api/trpc"
# You can generate the secret via 'openssl rand -base64 32' on Unix
# or using node js itself to generate the random secret
# node -e 'console.log(require("crypto").randomBytes(50).toString("base64"));'
# @see https://next-auth.js.org/configuration/options#secret
AUTH_SECRET='supersecret'
22 changes: 0 additions & 22 deletions .eslintrc.js

This file was deleted.

126 changes: 97 additions & 29 deletions .github/actions/yarn-nm-install/action.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,127 @@
# https://github.com/belgattitude/nextjs-monorepo-example/blob/0dec79c0d8768361c0f13cf8e20398d149b0e5a9/.github/actions/yarn-nm-install/action.yml
# https://github.com/belgattitude/nextjs-monorepo-example/blob/7a28e746859024989a02b7d2ecbd8b061292c277/.github/actions/yarn-nm-install/action.yml

name: "Monorepo install (yarn)"
description: "Run yarn install with node_modules linker and cache enabled"
########################################################################################
# "yarn install" composite action for yarn 3/4+ and "nodeLinker: node-modules" #
#--------------------------------------------------------------------------------------#
# Requirement: @setup/node should be run before #
# #
# Usage in workflows steps: #
# #
# - name: 📥 Monorepo install #
# uses: ./.github/actions/yarn-nm-install #
# with: #
# enable-corepack: false # (default = 'false') #
# cache-npm-cache: false # (default = 'true') #
# cwd: ${{ github.workspace }}/apps/my-app # (default = '.') #
# cache-prefix: add cache key prefix # (default = 'default') #
# cache-node-modules: false # (default = 'false') #
# cache-install-state: false # (default = 'false') #
# #
# Reference: #
# - latest: https://gist.github.com/belgattitude/042f9caf10d029badbde6cf9d43e400a #
# #
# Versions: #
# - 1.2.0 - 01-05-2024 - action/cache upraded to v4 #
# - 1.1.0 - 22-07-2023 - Option to enable npm global cache folder. #
# - 1.0.4 - 15-07-2023 - Fix corepack was always enabled. #
# - 1.0.3 - 05-07-2023 - YARN_ENABLE_MIRROR to false (speed up cold start) #
# - 1.0.2 - 02-06-2023 - install-state default to false #
# - 1.0.1 - 29-05-2023 - cache-prefix doc #
# - 1.0.0 - 27-05-2023 - new input: cache-prefix #
########################################################################################

name: 'Monorepo install (yarn)'
description: 'Run yarn install with node_modules linker and cache enabled'
inputs:
enable-corepack:
description: "Enable corepack"
cwd:
description: "Changes node's process.cwd() if the project is not located on the root. Default to process.cwd()"
required: false
default: "true"

playwright-skip-browser-download:
description: "Avoid playwright to download browsers automatically"
default: '.'
cache-prefix:
description: 'Add a specific cache-prefix'
required: false
default: 'default'
cache-npm-cache:
description: 'Cache npm global cache folder often used by node-gyp, prebuild binaries (invalidated on lock/os/node-version)'
required: false
default: 'true'
cache-node-modules:
description: 'Cache node_modules, might speed up link step (invalidated lock/os/node-version/branch)'
required: false
default: 'false'
cache-install-state:
description: 'Cache yarn install state, might speed up resolution step when node-modules cache is activated (invalidated lock/os/node-version/branch)'
required: false
default: 'false'
enable-corepack:
description: 'Enable corepack'
required: false
default: "1"
default: 'true'

runs:
using: "composite"
using: 'composite'

steps:
- name: ⚙️ Enable Corepack
if: ${{ inputs.enable-corepack }} == 'true'
if: inputs.enable-corepack == 'true'
shell: bash
working-directory: ${{ inputs.cwd }}
run: corepack enable

- name: ⚙️ Expose yarn config as "$GITHUB_OUTPUT"
id: yarn-config
shell: bash
working-directory: ${{ inputs.cwd }}
env:
YARN_ENABLE_GLOBAL_CACHE: 'false'
run: |
echo "CACHE_FOLDER=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
# Yarn rotates the downloaded cache archives, @see https://github.com/actions/setup-node/issues/325
# Yarn cache is also reusable between arch and os.
echo "CURRENT_NODE_VERSION="node-$(node --version)"" >> $GITHUB_OUTPUT
echo "CURRENT_BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's,/,-,g')" >> $GITHUB_OUTPUT
echo "NPM_GLOBAL_CACHE_FOLDER=$(npm config get cache)" >> $GITHUB_OUTPUT

- name: ♻️ Restore yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-download-cache
with:
path: ${{ steps.yarn-config.outputs.CACHE_FOLDER }}
key: yarn-download-cache-${{ hashFiles('yarn.lock') }}
key: yarn-download-cache-${{ inputs.cache-prefix }}-${{ hashFiles(format('{0}/yarn.lock', inputs.cwd), format('{0}/.yarnrc.yml', inputs.cwd)) }}
restore-keys: |
yarn-download-cache-
# Save install_state (invalidated on yarn.lock changes)
yarn-download-cache-${{ inputs.cache-prefix }}-

- name: ♻️ Restore node_modules
if: inputs.cache-node-modules == 'true'
id: yarn-nm-cache
uses: actions/cache@v4
with:
path: ${{ inputs.cwd }}/**/node_modules
key: yarn-nm-cache-${{ inputs.cache-prefix }}-${{ runner.os }}-${{ steps.yarn-config.outputs.CURRENT_NODE_VERSION }}-${{ steps.yarn-config.outputs.CURRENT_BRANCH }}-${{ hashFiles(format('{0}/yarn.lock', inputs.cwd), format('{0}/.yarnrc.yml', inputs.cwd)) }}

- name: ♻️ Restore global npm cache folder
if: inputs.cache-npm-cache == 'true'
id: npm-global-cache
uses: actions/cache@v4
with:
path: ${{ steps.yarn-config.outputs.NPM_GLOBAL_CACHE_FOLDER }}
key: npm-global-cache-${{ inputs.cache-prefix }}-${{ runner.os }}-${{ steps.yarn-config.outputs.CURRENT_NODE_VERSION }}-${{ hashFiles(format('{0}/yarn.lock', inputs.cwd), format('{0}/.yarnrc.yml', inputs.cwd)) }}

- name: ♻️ Restore yarn install state
if: inputs.cache-install-state == 'true' && inputs.cache-node-modules == 'true'
id: yarn-install-state-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .yarn/ci-cache/
key: ${{ runner.os }}-yarn-install-state-cache-${{ hashFiles('yarn.lock', '.yarnrc.yml') }}
path: ${{ inputs.cwd }}/.yarn/ci-cache
key: yarn-install-state-cache-${{ inputs.cache-prefix }}-${{ runner.os }}-${{ steps.yarn-config.outputs.CURRENT_NODE_VERSION }}-${{ steps.yarn-config.outputs.CURRENT_BRANCH }}-${{ hashFiles(format('{0}/yarn.lock', inputs.cwd), format('{0}/.yarnrc.yml', inputs.cwd)) }}

- name: 📥 Install dependencies
shell: bash
run: |
yarn install --immutable --inline-builds
working-directory: ${{ inputs.cwd }}
run: yarn install --immutable --inline-builds
env:
# CI optimizations. Overrides yarnrc.yml options (or their defaults) in the CI action.
YARN_ENABLE_GLOBAL_CACHE: "false" # Use local cache folder to keep downloaded archives
YARN_NM_MODE: "hardlinks-local" # Hardlinks-(local|global) reduces io / node_modules size
YARN_INSTALL_STATE_PATH: .yarn/ci-cache/install-state.gz # Very small speedup when lock does not change
# Overrides/align yarnrc.yml options (v3, v4) for a CI context
YARN_ENABLE_GLOBAL_CACHE: 'false' # Use local cache folder to keep downloaded archives
YARN_ENABLE_MIRROR: 'false' # Prevent populating global cache for caches misses (local cache only)
YARN_NM_MODE: 'hardlinks-local' # Reduce node_modules size
YARN_INSTALL_STATE_PATH: '.yarn/ci-cache/install-state.gz' # Might speed up resolution step when node_modules present
# Other environment variables
HUSKY: "0" # By default do not run HUSKY install
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: ${{ inputs.playwright-skip-browser-download }}
HUSKY: '0' # By default do not run HUSKY install
Loading
Loading