Personal blog and portfolio website.
Check out the page
Table of Contents
This project is designed to serve my portfolio/blog page hosted on my website piotrdoniak.com. I want to share my thoughts, projects, and networking activities with others. With this project, I can showcase my professional and personal accomplishments to potential employers, clients, and collaborators.
Overall, this portfolio/blog page project represents my commitment to showcasing my skills, sharing my experiences, and building my network.
You can clone this repository and run it locally. To get a local copy up and running follow these simple steps.
Clone the repository and install the dependencies.
git clone https://github.com/boleknowak/piotrdoniak.com.git
cd piotrdoniak.com
npm install
# or
yarn install
# or
pnpm install
This project uses PostgreSQL as its database. You can set up a local database or use a remote one. You will need DATABASE_URL environment variable to connect to the database.
Move .env.example
to .env
and fill in the variables.
mv .env.example .env
Example .env
file:
# Application
APP_URL=http://localhost:3000
NEXT_PUBLIC_ANALYTICS_ID=GA-XXXXXXXXXX
NEXT_PUBLIC_TINYMCE_API_KEY=
NEXT_PUBLIC_FILE_UPLOAD_URL=
NEXT_PUBLIC_FILE_DOWNLOAD_URL=
NEXT_PUBLIC_FILE_NAME=
DISCORD_WEBHOOK_URL=
# Auth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET="<very-secret-string>"
GOOGLE_ID=
GOOGLE_SECRET=
# Database
DB_HOST=localhost
DB_PORT=5432
DB_DATABASE=blog
DB_USERNAME=your-name
DB_PASSWORD=your-super-secret-password
DATABASE_URL="postgresql://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_DATABASE}?schema=public"
Note: DATABASE_URL: The full database connection URL. This is required and is used by prisma.
This project uses Prisma as its ORM. You can find more information about Prisma here.
Use the following command to generate the Prisma client:
npx prisma migrate dev
View the database diagram here.
- Visit the Google Cloud Console
- Go to the OAuth consent screen tab, fill first step leaving the rest blank and click Save. This will create a project for you.
- Now Publish your OAuth consent screen App.
- Go to the Credentials tab and click Create Credentials -> OAuth Client ID.
- Choose Web Application
- Add
http://localhost:3000
to the Authorized JavaScript origins - Add
http://localhost:3000/api/auth/callback/google
to the Authorized redirect URIs - Click Create
- Copy the Client ID and Client Secret and paste them into the
.env
file.
GOOGLE_ID=your_client_id
GOOGLE_SECRET=your_client_secret
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
- Add Posts Section
- Add Calendar functionality
- Add Newsletter
If you have a suggestion that would make this better, feel free to fork the repo and create a pull request. You can also simply open an issue.
Distributed under the MIT License.
Piotr Doniak - hello@piotrdoniak.com