- Framework: Next.js
- Styling: Tailwind CSS
- Content: MDX and velite
- Database: Neon and Drizzle ORM
- Analytics: Umami
- Deployment: Vercel
.
|____config
|____content
|____public
|____scripts
|____src
| |____actions
| |____app
| |____assets
| |____components
| | |____core
| | |____molecules
| | |____og
| | |____views
| | |____icons.ts
| |____data
| |____hooks
| |____lib
| |____providers
| |____styles
| |____types
| |____utils
config/*
- Includes all the custom configuration for MDX, velite and Next.jscontent/*
- MDX blog posts and the content for thedonate
pagespublic/*
- Static assets including images, fonts, audios, files, etc.scripts/*
- Utilities to setup the projectsrc/app/*
- Every page and API route in the website. Uses the new App Router from Next.js13.+
src/assets/*
- Fonts and static images used in different componentssrc/components/core/*
- The simplest components. Most of them are statelesssrc/components/molecules/*
- The main blocks for the website:toolbar
,footer
,main
layout,back-to-top
button andsocial links
src/components/og/*
- The code that powers dynamic open-graph images generationsrc/components/views/*
- More complex components to build the different pages of my website. (They're here to keepsrc/app/
as clean as possible)src/components/icons.ts
- SVG icon paths. Icons come from Material Design Icons and Lucidesrc/data/*
- JSON files containing data for projects and theuses
pagesrc/hooks/*
- A couple hooks used throughout the appsrc/lib/*
- Short for "library", a collection of helpful utilities or code for external servicessrc/providers/*
- React Contexts for storing the current theme and blog post reactionssrc/styles/*
- Global styles withscss
. Mostly use tailwind classessrc/types/*
- Some types definitionssrc/utils/*
- More utilities functions but less complex than the ones inlib
This application requires Node.js v18.18+.
-
Clone the project, install dependencies and run initial setup
git clone https://github.com/jahirfiquitiva/jahir.dev.git cd jahir.dev bun bun run setup # You can skip this if you're contributing to this repository. It removes all of my personal content and files
-
Create a
.env
file similar to.env.example
. -
(Optional) This project uses a postgres database to store the views and reactions count.
CREATE TABLE counters ( slug VARCHAR(255) PRIMARY KEY NOT NULL, views INTEGER NOT NULL DEFAULT 0, likes INTEGER NOT NULL DEFAULT 0, loves INTEGER NOT NULL DEFAULT 0, awards INTEGER NOT NULL DEFAULT 0, bookmarks INTEGER NOT NULL DEFAULT 0 );
-
Run the project locally:
bun run dev
Note
Some things might be broken or not found because the bun run setup
script will remove many files.
Please double check the code and implementations.
Please review the license, do not copy it directly, remove all of my personal content and files (resume, blog posts, images, etc.) by running bun run setup
and please change the styling and colors to match your personal brand. You are free to use this code as inspiration or learning reference but this is not really intended to be a template.
Additional changes
Make sure to set the IS_TEMPLATE
environment variable to false.
Otherwise, the colors in the website might be inverted. (See src/styles/globals.scss
)
All the previous versions of this website can be found at jahirfiquitiva/prev-websites