From 60617cda3616af85b84dc375fbdfcf43b23ea89c Mon Sep 17 00:00:00 2001 From: AlanD20 Date: Sat, 12 Oct 2024 12:45:41 +0200 Subject: [PATCH 1/4] update deploy script --- deploy.sh | 93 ++++++++++++++++++++++++++----------------------------- 1 file changed, 44 insertions(+), 49 deletions(-) diff --git a/deploy.sh b/deploy.sh index c66100b..4e9ed2e 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,8 +1,13 @@ -#!/bin/bash +#!/usr/bin/env bash -USER= -SCRIPT_PATH= -BASE_PATH= +user=$1 +backup_path=$2 +project_path=$3 + +if [[ $user == "" || $backup_path == "" || $project_path == "" ]]; then + echo "- [x] Args are required: (1) user (2) absolute script path (3) absolute project path" + exit 1 +fi # Find bin directory path for global npm packages using 'npm config get prefix' PATH=$PATH:/home/$USER/.nvm/versions/node/lts/bin @@ -10,64 +15,54 @@ PATH=$PATH:/home/$USER/.nvm/versions/node/lts/bin # Stop portfolio service pm2 delete nextjs-portfolio && pm2 save -f -# Copy database file if exists -if [ -f "$BASE_PATH/prisma/db.sqlite" ]; then - cp -f "$BASE_PATH/prisma/db.sqlite" "$SCRIPT_PATH/db.sqlite" +if $?; then + echo "- [x] unable to delete existing project from pm2 list" + exit 1 fi -# Copy .env file if exists -if [ -f "$BASE_PATH/.env" ]; then - cp -f "$BASE_PATH/.env" "$SCRIPT_PATH/.env" -fi +files_need_backup=( + "prisma/db.sqlite" # current database + ".env" # .env file + "src/config/app.ts" # app configuration +) -# Copy config app file if exists -if [ -f "$BASE_PATH/src/config/app.ts" ]; then - cp -f "$BASE_PATH/src/config/app.ts" "$SCRIPT_PATH/app.ts" -fi +# Take backups +for file in "${files_need_backup[@]}"; do + if [ -f "$project_path/$file" ]; then + filename=$(basename "$file") + cp -f "$project_path/$file" "$backup_path/$filename" + fi +done # Remove Everything in base path -rm -rf $BASE_PATH/* $BASE_PATH/.* +rm -rf "$project_path" # Clone Repository -git clone https://github.com/AlanD20/aland20.com.git "$BASE_PATH/." +git clone ssh://git@github.com:AlanD20/aland20.com.git "$project_path/." # Recover .env file if exists -if [ -f "$SCRIPT_PATH/.env" ]; then - cp -f "$SCRIPT_PATH/.env" "$BASE_PATH/.env" +if [ -f "$backup_path/.env" ]; then + cp -f "$backup_path/.env" "$project_path/.env" fi -# Install dependencies -cd "$BASE_PATH" && yarn && yarn db:reset +# Recover Backups +for file in "${files_need_backup[@]}"; do + filename=$(basename "$file") + if [ -f "$backup_path/$filename" ]; then + cp -f "$backup_path/$filename" "$project_path/$file" + echo "- [x] Successful restore: $file" + continue + fi -# Recover Config file if exists -if [ -f "$SCRIPT_PATH/app.ts" ]; then - cp -f "$SCRIPT_PATH/app.ts" "$BASE_PATH/src/config/app.ts" -fi + echo "- [x] Failed to restore: $file" +done -# Recover database if exists -if [ -f "$SCRIPT_PATH/db.sqlite" ]; then - cp -f "$SCRIPT_PATH/db.sqlite" "$BASE_PATH/prisma/db.sqlite" -fi - -# Check Setup Process -if [ -f "$BASE_PATH/.env" ]; then - echo "- [x] Env file copied!" -else - echo "- [x] Failed to copy env file!" -fi - -if [ -f "$BASE_PATH/prisma/db.sqlite" ]; then - echo "- [x] Database restored!" -else - echo "- [x] Failed to restore database!" -fi +# Install dependencies +cd "$project_path" && pnpm && pnpm db:push && pnpm build && pnpm pm2 && pm2 save -f -if grep -Fq "https://aland20.com" "$BASE_PATH/src/config/app.ts"; then - echo "- [x] Config file updated!" -else - echo "- [x] Failed to update config file!" +if $?; then + echo "- [x] Failed to build project" + exit 1 fi -cd "$BASE_PATH" && yarn build && yarn pm2 && pm2 save -f - -echo "- [x] Deployment Successsful!" +echo "- [x] Deployment successful!" From ec5beb633c70ea4be90262468aef3cb4a3722634 Mon Sep 17 00:00:00 2001 From: AlanD20 Date: Sat, 12 Oct 2024 12:45:53 +0200 Subject: [PATCH 2/4] use pnpm and fix typos --- .env.example | 2 +- .github/workflows/deploy.yml | 10 ++++---- README.md | 34 ++++++++++++++-------------- package.json | 12 +++++----- tsconfig.json | 44 ++++++++++++++++++++++++++---------- 5 files changed, 61 insertions(+), 41 deletions(-) diff --git a/.env.example b/.env.example index af26795..230b4f3 100644 --- a/.env.example +++ b/.env.example @@ -11,7 +11,7 @@ BCC_EMAIL=aland20@pm.me ABSTRACT_API_KEY= -DATABASE_URL=file:./db.sqlite +DATABASE_URL=file:./primsa/db.sqlite GITHUB_ID= GITHUB_SECRET= diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a15616d..c54d0ca 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,15 +13,15 @@ jobs: - name: Create env file run: cp .env.example .env - name: Install dependencies - run: yarn install + run: pnpm install - name: Build CSS - run: yarn css:prod + run: pnpm css:prod - name: Run nextjs lint - run: yarn lint + run: pnpm lint - name: Run eslint - run: yarn eslint + run: pnpm eslint - name: Build project - run: yarn build + run: pnpm build # deploy: # needs: [ "lint-build" ] # runs-on: ubuntu-latest diff --git a/README.md b/README.md index 2064979..e7b0888 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ### AlanD20 Portfolio --- -Dynamic porfolio with support for admin dashboard to control the website. +Dynamic portfolio with support for admin dashboard to control the website. To access the dashboard with the features, you must be authorized. Otherwise, you'll be redirected to the main page by taking advantage of Nextjs v12 middlewares. @@ -23,13 +23,13 @@ To access the dashboard with the features, you must be authorized. Otherwise, yo 1. Install the packages ```bash - yarn install + pnpm install ``` 2. You may generate a secret key for `NEXTAUTH_SECRET` environment variable using the following command. But, make sure you have installed `openssl`. ```bash - yarn generate:secret + pnpm generate:secret ``` 3. The following files must be changed during deployment in production: @@ -40,19 +40,19 @@ To access the dashboard with the features, you must be authorized. Otherwise, yo 4. Generate the database schema with default seeding ```bash - yarn db:reset + pnpm db:reset ``` 5. Finally, build the project and start pm2 config. ```bash - yarn build && yarn pm2 + pnpm build && pnpm pm2 ``` - For adding new changes, build the project and restart pm2 by passing our application name which we set in `pm2.json` file. ```bash - yarn build && pm2 restart nextjs-portfolio + pnpm build && pm2 restart nextjs-portfolio ``` --- @@ -62,14 +62,14 @@ To access the dashboard with the features, you must be authorized. Otherwise, yo 1. Install packages ```bash - yarn install + pnpm install ``` 2. Define environment variables in .env file with your local environment. You can use .env.sample as a starting point 3. Run the dev server ```bash - yarn dev + pnpm dev ``` 4. And everything should work :) Don't forget to checkout [src/config](/src/config/) directory to configure the app. @@ -81,35 +81,35 @@ To access the dashboard with the features, you must be authorized. Otherwise, yo - postcss commands. ```bash - yarn css:dev # Watch for changes during css files for development - yarn css:prod # build minified css files for production + pnpm css:dev # Watch for changes during css files for development + pnpm css:prod # build minified css files for production ``` - Any changes in Prisma schema, you must push it to the database and generate the `prisma/client` file. The following command does both job at once. ```bash - yarn db:push + pnpm db:push ``` - Prisma commands. ```bash - yarn db:reset # Create + Seed with base data - yarn db:push # Create only - yarn db:seed # Seed only - yarn prisma:studio # Start Prisma studio server + pnpm db:reset # Create + Seed with base data + pnpm db:push # Create only + pnpm db:seed # Seed only + pnpm prisma:studio # Start Prisma studio server ``` - You may want to manually run prettier format. ```bash - yarn format + pnpm format ``` - You may want to generate a secret key for *NEXTAUTH_URL*. You need openssl installed on the machine. ```bash - yarn generate:secret + pnpm generate:secret ``` --- diff --git a/package.json b/package.json index 0e9bb49..d85a6b5 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "author": "AlanD20", "name": "aland20-portfolio", - "description": "Dyanamic portfolio", + "description": "dynamic portfolio", "license": "GPL", "version": "2.2.3", "private": true, "scripts": { - "dev": "yarn css:prod && next dev", - "build": "yarn css:prod && next build", + "dev": "pnpm css:prod && next dev", + "build": "pnpm css:prod && next build", "start": "next start", "lint": "next lint", "eslint": "eslint pages src", @@ -18,10 +18,10 @@ "prisma:studio": "prisma studio", "db:push": "prisma db push --force-reset && prisma generate", "db:seed": "prisma db seed", - "db:reset": "yarn db:push && yarn db:seed", + "db:reset": "pnpm db:push && pnpm db:seed", "generate:secret": "openssl rand -base64 32", "pm2": "pm2 start pm2.json", - "deploy": "yarn db:reset && yarn build" + "deploy": "pnpm db:push && pnpm build" }, "dependencies": { "@next-auth/prisma-adapter": "^1.0.7", @@ -73,4 +73,4 @@ "prisma": { "seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts" } -} \ No newline at end of file +} diff --git a/tsconfig.json b/tsconfig.json index d61d991..0784d8b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,16 +2,18 @@ "compilerOptions": { "target": "es2015", "module": "esnext", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "checkJs": false, "jsx": "preserve", "incremental": true, "noEmit": true, - "strict": true, "strictNullChecks": true, - "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitAny": false, @@ -19,22 +21,40 @@ "noFallthroughCasesInSwitch": true, "strictPropertyInitialization": true, "forceConsistentCasingInFileNames": true, - "moduleResolution": "node", "resolveJsonModule": true, - "types": ["node"], + "types": [ + "node" + ], "esModuleInterop": true, "skipLibCheck": true, "isolatedModules": true, "baseUrl": ".", "paths": { - "@config": ["src/config/app.ts"], - "@misc/*": ["src/components/misc/*"], - "@comp/*": ["src/components/*"], - "@/*": ["src/*"], - "@/seed/*": ["prisma/*"] + "@config": [ + "src/config/app.ts" + ], + "@misc/*": [ + "src/components/misc/*" + ], + "@comp/*": [ + "src/components/*" + ], + "@/*": [ + "src/*" + ], + "@/seed/*": [ + "prisma/*" + ] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "src/**/*"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + "src/**/*" + ], + "exclude": [ + "node_modules" + ] } From 7a4b3712c0482308a1859358806d882f3ae8e472 Mon Sep 17 00:00:00 2001 From: AlanD20 Date: Sat, 12 Oct 2024 14:04:29 +0200 Subject: [PATCH 3/4] update website content --- pages/contact.tsx | 5 +++ pages/faq.tsx | 4 ++ pages/index.tsx | 39 ++++++++++++------ pages/projects.tsx | 10 ++--- prisma/data/faqs.ts | 18 ++++++-- prisma/data/projects.ts | 49 +++++++++++++++++++++- prisma/data/skills.ts | 50 +++++++++-------------- prisma/data/tags.ts | 15 ++++++- prisma/seed.ts | 1 + src/components/front-page/ProjectTile.tsx | 40 ++++++++++-------- 10 files changed, 159 insertions(+), 72 deletions(-) diff --git a/pages/contact.tsx b/pages/contact.tsx index a76bbb7..891f3c6 100644 --- a/pages/contact.tsx +++ b/pages/contact.tsx @@ -19,6 +19,11 @@ const ContactPage: NextPage = () => ( aland20@pm.me. Or, you can submit the following form to send me an email.

+

+ Note: The form might be disabled because I + dont like to configure SMTP server. In this case, send me an email + directly. +

diff --git a/pages/faq.tsx b/pages/faq.tsx index 4951c4d..58e77b1 100644 --- a/pages/faq.tsx +++ b/pages/faq.tsx @@ -18,6 +18,10 @@ const FaqPage: NextPage = ({ faqs }: Props) => ( are the reasons behind my choices. So, let me know if you have any other questions. I will try to add new ones in the future.

+

+ You can always try running this website locally and checkout the source + code in the github repository. +

{faqs.length > 0 ? ( diff --git a/pages/index.tsx b/pages/index.tsx index e95bca6..f7b1656 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -14,28 +14,43 @@ type Props = { const HomePage: NextPage = ({ skills }: Props) => (
-

Welcome to my portfolio!

+

Welcome to my personal website!

- Hey! I'm Aland, working as a software engineer. I obtained my - bachelor of computer engineering degree in Warsaw, Poland in 2023. This is - my personal website where I will showcase my projects and other stuffs - that I work on. + Hey! I'm Aland, working as a software Engineer and Cloud + Infrastructure Engineer. I obtained my bachelor of computer engineering + degree in Warsaw, Poland in 2023. This is my personal website where you + can find my experience, projects, and probably more stuff.

- Here is a list of technologies I have tried. The list will be updated when - I use any new technologies in my projects or any project I work on. - Although, it may not be up to date with everything I use, but I try my - best to keep them up to date so that in the future, each tech will be - linked to its own projects. + I have experience in leading many complex integration projects that + require leading, designing, implementation decisions for scalability, + maintenance, monitoring, logging, and communication with many teams to + make this integration workflow across multiple products into existence. In + Cloud Infrastructure side, I worked on maintenance, reliability, CI, CD, + monitoring, and logging of the infrastructure. I have been getting into a + lot of enterprise level services particularly with AWS services and + microservice architecture with Event-Driven and Queue System Design.

- - Experienced in application and web development. + - Experienced in Software Development and led many projects from design to + deployment. - Understanding the fundamental of data structure & Algorithms. - - Knowledge of Security, Protection, Networking, Database. + - Decently deep understanding of relational databases. + + + - Knowledge of Security, Protection, Networking in advanced level. + + + - Understanding of many scalable architecture such as Event-Driven, + Queue System, monolithic, and microservices. + + + - Understanding of monitoring and logging such as OpenSearch setup, + FilaBeat, Grafana, Prometheus.

diff --git a/pages/projects.tsx b/pages/projects.tsx index 2e8a267..b0ef9b3 100644 --- a/pages/projects.tsx +++ b/pages/projects.tsx @@ -23,11 +23,11 @@ const ProjectsPage: NextPage = ({ projects }: Props) => ( updated each time I make a new project.

- I will only try to share those projects that I'm proud of. Although, - some of them might be easy for someone else, but I consider them - challenging and interesting to bring solutions from my own experience. - Some of them are my first hand-on experience for the technologies I have - used. + I will only try to put those projects that probably worth sharing here. + Although checkout my github for all the projects. Some of them are my + first hand-on experience for a tool or language and some are just + utilities and helper scripts that helps me to do my daily works + conveniently.

diff --git a/prisma/data/faqs.ts b/prisma/data/faqs.ts index 08442f2..391b01b 100644 --- a/prisma/data/faqs.ts +++ b/prisma/data/faqs.ts @@ -1,18 +1,28 @@ const faqs = [ + { + title: 'Was it worth it to use Nextjs for this website?', + content: + "@pg ABSOLUTELY not. Although I learnt why I shouldn't use nextjs for my next project :) @block The developer experience is pretty good and I did enjoy working with it. But it was the time to deploy (I'm a self-host person) I got a lot of issues especially with the static data and how the SSR is being deployed using nginx. It was not convenient at all. @endblock @block Now, this is running on Vercel, which is so much easier but the bandwidth per month is limited @endblock @endpg", + }, { title: 'What does the login button do?', content: - '@pg The login button is only allowed for some github users to login as an admin of the website. Admin users can manage the entire website such as, Adding/ Editing/ Deleting content throughout the website. @endpg', + '@pg The login button is only allowed for some github users to login as an admin of the website. Admin users can manage the entire website such as: Adding, Editing, and Deleting content throughout the website. @endpg', }, { - title: 'What technologies have you used to build this websit?', + title: 'What technologies have you used to build this website?', content: - "@pg I was in the process of learning Next.js, Prisma, GraphQL. Then, I wanted to update my personal website for a long time. So, I thought this is a good chance to create a project using those technologies I'm trying to learn. @block I have used Next.js with Typescript, Prisma, SQLite, TailwindCSS. @endblock @endpg", + '@pg I wanted to update my personal website for a long time, and I was also interested in learning Next.js, Prisma, GraphQL. So, I utilized these technologies as a first-hand to build this website. The experience of using those were amazing but deployment is a pain! @block You can checkout the @link([https://github.com/AlanD20/aland20.com][github repo]) to see how this is done. I used Next.js with Typescript, Prisma, SQLite, TailwindCSS. And additional authentication with GitHub to build an admin dashboard so that I can dynamically update the content of this website. I also built a custom directive parser that helps me to use a friendly directive in my contents to make them HTML compatible. @endblock @endpg', }, { title: 'Why do you use database for your personal website?', content: - '@pg I do a lot of content modification for the website. So, It was a good reason for me to use a database to have simple CRUD actions. Especially SQLite as a file, which allows me to easily back up all the contents without worrying about losing the data. @endpg', + "@pg I do a lot of content modification for the website. So, It was a good reason for me to use a database to have simple CRUD actions. Especially SQLite as a file, which allows me to easily back up all the contents without worrying about losing the data. @block On the other side, when I moved to Vercel to host this website, I'm currently using a static file to show these data on the website. @endblock @endpg", + }, + { + title: 'Custom Directives? What is this?', + content: + '@pg You can find the README file in the @link([https://github.com/AlanD20/aland20.com/tree/main/src/modules/CustomDirectives][GitHub repository with examples]). @block The whole website contents are rendered using this custom directive renderer where also you can find the static data in the @link([https://github.com/AlanD20/aland20.com/tree/main/prisma/data][GitHub repository with actual data there.]) @endblock @endpg', }, ]; export default faqs; diff --git a/prisma/data/projects.ts b/prisma/data/projects.ts index 1b017a6..41b1435 100644 --- a/prisma/data/projects.ts +++ b/prisma/data/projects.ts @@ -26,6 +26,53 @@ const projects = [ { id: 56 }, ], }, + { + priority: 6, + title: 'Dot Files', + content: + '@pg My personal @marker([.dotfiles]) where you find all the configuration files for my setup and scripts where I commonly use in day-to-day basis. @block --- @endblock @block It also includes a few documentation pages about how to setup your laptop or workspace from scratch. @link([https://github.com/AlanD20/.dotfiles/tree/main/workspace-setup][You may find them here]). I usually use this whenever I have to format my latop :) @endblock @endpg', + sourceLink: 'https://github.com/AlanD20/.dotfiles', + previewLink: null, + createdDate: '2023-01-16', + completedDate: null, + tags: [ + { id: 69 }, + { id: 26 }, + { id: 9 }, + { id: 15 }, + { id: 70 }, + { id: 71 }, + ], + }, + { + priority: 5, + title: 'PHP Helpers', + content: + '@pg Some useful PHP classes and helpers to speed up basic projects. @endpg', + sourceLink: 'https://github.com/AlanD20/php-helpers', + previewLink: null, + createdDate: '2023-08-08', + completedDate: null, + tags: [{ id: 34 }, { id: 66 }, { id: 67 }, { id: 29 }, { id: 68 }], + }, + { + priority: 5, + title: 'Python Utilities', + content: + '@pg Some useful Python utilities and helpers to speed up basic scripts for automation or testing. @endpg', + sourceLink: 'https://github.com/AlanD20/pytils', + previewLink: null, + createdDate: '2024-04-27', + completedDate: null, + tags: [ + { id: 38 }, + { id: 66 }, + { id: 67 }, + { id: 68 }, + { id: 29 }, + { id: 63 }, + ], + }, { priority: 5, title: 'Car Center', @@ -136,7 +183,7 @@ const projects = [ priority: 1, title: 'Web Blog', content: - '@pg The purpose of this project was to create a simple web blog using HTML/ CSS/ Vanilla Javascript to pass my course during my study. The website allows registeration and authentication. Registered users are be able to do the following actions: @block - Manage their accounts. @endblock @block - Publish articles about their favorite news and thoughts! @endblock @block - Create/ Delete their own articles. @endblock @endpg', + '@pg The purpose of this project was to create a simple web blog using HTML/ CSS/ Vanilla Javascript to pass my course during my study. The website allows registration and authentication. Registered users are be able to do the following actions: @block - Manage their accounts. @endblock @block - Publish articles about their favorite news and thoughts! @endblock @block - Create/ Delete their own articles. @endblock @endpg', sourceLink: 'https://github.com/AlanD20/web-blog', previewLink: 'https://webblog.aland20.repl.co/', createdDate: '2021-03-21', diff --git a/prisma/data/skills.ts b/prisma/data/skills.ts index 89995f2..f546255 100644 --- a/prisma/data/skills.ts +++ b/prisma/data/skills.ts @@ -3,32 +3,25 @@ const skills = [ priority: 5, title: 'Languages/Runtime', tags: [ - { id: 4 }, + { id: 60 }, + { id: 34 }, + { id: 65 }, + { id: 38 }, { id: 5 }, { id: 7 }, { id: 19 }, - { id: 21 }, { id: 33 }, - { id: 34 }, - { id: 38 }, - { id: 42 }, { id: 46 }, - { id: 48 }, - { id: 58 }, + { id: 4 }, { id: 59 }, - { id: 60 }, ], }, { priority: 4, title: 'Frameworks/Libraries/SDK', tags: [ - { id: 2 }, - { id: 3 }, - { id: 6 }, { id: 11 }, { id: 12 }, - { id: 14 }, { id: 18 }, { id: 20 }, { id: 25 }, @@ -36,16 +29,11 @@ const skills = [ { id: 30 }, { id: 37 }, { id: 39 }, - { id: 40 }, { id: 44 }, { id: 45 }, { id: 49 }, - { id: 50 }, - { id: 51 }, { id: 53 }, - { id: 54 }, { id: 55 }, - { id: 57 }, ], }, { @@ -53,16 +41,25 @@ const skills = [ title: 'tools', tags: [ { id: 1 }, - { id: 9 }, - { id: 10 }, { id: 15 }, { id: 16 }, - { id: 17 }, - { id: 24 }, - { id: 26 }, { id: 41 }, { id: 47 }, { id: 52 }, + { id: 10 }, + ], + }, + { + priority: 2, + title: 'DevOps/Infrastructure', + tags: [ + { id: 24 }, + { id: 61 }, + { id: 26 }, + { id: 9 }, + { id: 62 }, + { id: 63 }, + { id: 64 }, ], }, { @@ -73,14 +70,7 @@ const skills = [ { priority: 1, title: 'Databases', - tags: [ - { id: 28 }, - { id: 29 }, - { id: 32 }, - { id: 36 }, - { id: 43 }, - { id: 56 }, - ], + tags: [{ id: 28 }, { id: 29 }, { id: 32 }, { id: 36 }, { id: 56 }], }, ]; export default skills; diff --git a/prisma/data/tags.ts b/prisma/data/tags.ts index 9a22ebc..3de26b3 100644 --- a/prisma/data/tags.ts +++ b/prisma/data/tags.ts @@ -8,7 +8,7 @@ const tags = [ { strict: 'css', name: 'CSS' }, { strict: 'cypress', name: 'Cypress' }, { strict: 'docker', name: 'Docker' }, - { strict: 'extension', name: 'Extension' }, + { strict: 'extension', name: 'Google Chrome Extension' }, { strict: 'firebase', name: 'Firebase SDK' }, { strict: 'flutter', name: 'Flutter' }, { strict: 'freelance', name: 'Freelance' }, @@ -24,7 +24,7 @@ const tags = [ { strict: 'jira', name: 'Jira' }, { strict: 'kubernetes', name: 'Kubernetes' }, { strict: 'laravel', name: 'Laravel' }, - { strict: 'linux distros', name: 'Linux Distros' }, + { strict: 'linux', name: 'Linux/Terminal' }, { strict: 'meteor', name: 'Meteor' }, { strict: 'mongodb', name: 'MongoDB' }, { strict: 'mysql', name: 'MySQL' }, @@ -59,5 +59,16 @@ const tags = [ { strict: 'java', name: 'Java' }, { strict: 'deno', name: 'Deno' }, { strict: 'go', name: 'Go' }, + { strict: 'kafka', name: 'Apache Kafka' }, + { strict: 'prometheus', name: 'Prometheus' }, + { strict: 'cassandra', name: 'cassandra' }, + { strict: 'aws', name: 'AWS' }, + { strict: 'javascript', name: 'JavaScript' }, + { strict: 'helpers', name: 'Helpers' }, + { strict: 'utility', name: 'Utility' }, + { strict: 'devex', name: 'DevEx' }, + { strict: 'bash', name: 'Bash' }, + { strict: 'archlinux', name: 'archlinux' }, + { strict: 'sway', name: 'sway' }, ]; export default tags; diff --git a/prisma/seed.ts b/prisma/seed.ts index a672d83..75dfd85 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -8,6 +8,7 @@ const prisma = new PrismaClient(); async function processAsync(array: any[], action: Function) { for (const data of array) { + // eslint-disable-next-line no-await-in-loop await action(data); } } diff --git a/src/components/front-page/ProjectTile.tsx b/src/components/front-page/ProjectTile.tsx index 8bfd1bf..2f2efbf 100644 --- a/src/components/front-page/ProjectTile.tsx +++ b/src/components/front-page/ProjectTile.tsx @@ -49,24 +49,28 @@ const ProjectTile: NextPage = ({
- - Source Code - - - Live demo - + {sourceLink && ( + + Source Code + + )} + {previewLink && ( + + Live demo + + )}
); From ccbf20560dc8b25cc88280bb94fc0fa0e375ca1d Mon Sep 17 00:00:00 2001 From: AlanD20 Date: Sat, 12 Oct 2024 14:07:03 +0200 Subject: [PATCH 4/4] bump version and add vercel deploy --- .github/workflows/deploy.yml | 11 +++++++++-- package.json | 4 ++-- prisma/data/projects.ts | 6 +++--- src/components/front-page/ProjectTile.tsx | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c54d0ca..8444a97 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,9 +6,16 @@ jobs: lint-build: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4 + name: Install pnpm with: - node-version: "16" + version: 9 + run_install: false + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'pnpm' - uses: actions/checkout@v3 - name: Create env file run: cp .env.example .env diff --git a/package.json b/package.json index d85a6b5..5f690c2 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "aland20-portfolio", "description": "dynamic portfolio", "license": "GPL", - "version": "2.2.3", + "version": "2.3.0", "private": true, "scripts": { "dev": "pnpm css:prod && next dev", @@ -21,7 +21,7 @@ "db:reset": "pnpm db:push && pnpm db:seed", "generate:secret": "openssl rand -base64 32", "pm2": "pm2 start pm2.json", - "deploy": "pnpm db:push && pnpm build" + "vercel:deploy": "pnpm db:reset && pnpm build" }, "dependencies": { "@next-auth/prisma-adapter": "^1.0.7", diff --git a/prisma/data/projects.ts b/prisma/data/projects.ts index 41b1435..180daf2 100644 --- a/prisma/data/projects.ts +++ b/prisma/data/projects.ts @@ -32,7 +32,7 @@ const projects = [ content: '@pg My personal @marker([.dotfiles]) where you find all the configuration files for my setup and scripts where I commonly use in day-to-day basis. @block --- @endblock @block It also includes a few documentation pages about how to setup your laptop or workspace from scratch. @link([https://github.com/AlanD20/.dotfiles/tree/main/workspace-setup][You may find them here]). I usually use this whenever I have to format my latop :) @endblock @endpg', sourceLink: 'https://github.com/AlanD20/.dotfiles', - previewLink: null, + previewLink: '', createdDate: '2023-01-16', completedDate: null, tags: [ @@ -50,7 +50,7 @@ const projects = [ content: '@pg Some useful PHP classes and helpers to speed up basic projects. @endpg', sourceLink: 'https://github.com/AlanD20/php-helpers', - previewLink: null, + previewLink: '', createdDate: '2023-08-08', completedDate: null, tags: [{ id: 34 }, { id: 66 }, { id: 67 }, { id: 29 }, { id: 68 }], @@ -61,7 +61,7 @@ const projects = [ content: '@pg Some useful Python utilities and helpers to speed up basic scripts for automation or testing. @endpg', sourceLink: 'https://github.com/AlanD20/pytils', - previewLink: null, + previewLink: '', createdDate: '2024-04-27', completedDate: null, tags: [ diff --git a/src/components/front-page/ProjectTile.tsx b/src/components/front-page/ProjectTile.tsx index 2f2efbf..f872193 100644 --- a/src/components/front-page/ProjectTile.tsx +++ b/src/components/front-page/ProjectTile.tsx @@ -49,7 +49,7 @@ const ProjectTile: NextPage = ({
- {sourceLink && ( + {sourceLink !== '' && ( = ({ Source Code )} - {previewLink && ( + {previewLink !== '' && (