Skip to content

My professional development portfolio website, built with NextJS, Sanity CMS, TailwindCSS, and TypeScript

License

Notifications You must be signed in to change notification settings

aleciavogel/alecia.ca

Repository files navigation

alecia.ca

Next.js badge Sanity CMS badge Nx badge TypeScript badge React Tailwind CSS badge Resend badge Font Awesome badge Bun.sh badge

This is the source code for my personal website, alecia.ca. I'm sharing it as an open-source project so others can explore how it’s built, learn from it, or even contribute if they’d like. It’s also a great way for me to gather feedback and improve over time.

One of the cool features of this website is that the blog comments are powered by this repository's GitHub Discussions. It keeps things simple and connected, letting readers share their thoughts while staying part of the development process. You'll need a GitHub account to participate.

Whether you're here to learn, contribute, or just take a peek, I hope you find something useful. 😄

Table of Contents

Getting Started

Important

You will need around 7GB of RAM to run this project locally. ~8GB if you want to run Storybook at the same time.

Extra note for WebStorm users RE: memory

YMMV, but you will likely need to increase WebStorm's memory heap to 4096MiB. The default of 2048MiB was not enough for me to run this project. Sowwy 🥺👉👈

Prerequisites

You will need the following installed on your machine:

1. Install dependencies

Run the following command to install the project's dependencies:

bun install

2. Update Your etc/hosts File

To enable local development, you'll need to update your etc/hosts file to include the following entry:

127.0.0.1 alecia.local

3. Set Up Doppler Secrets

To configure environment secrets, use Doppler. You can upload the basic configuration from the .env.dist file included in this repository:

doppler secrets upload .env.dist --config dev

This will populate Doppler with the environment variables needed for local development.

4. Collect required environment variables

Before running the project, you'll need to acquire the following keys and API credentials:

  • Cloudflare Turnstile Key:
    Sign up on Cloudflare Turnstile and obtain your key.

  • Sanity Project Details:
    Create an account on Sanity, set up a project, and retrieve the required values, such as the project ID and dataset name.

  • Resend API Key:
    Sign up on Resend and generate an API key.

Once obtained, add these credentials to your Doppler configuration.

Running the Project

Run the following command to start the project in development mode:

nx dev web

Visit https://alecia.local:3000 to access the site.

Running Storybook

To run Storybook, use the following command:

nx storybook design-system

This will load all story files across all libs and apps. You will be able to access it from http://localhost:4400.

Running Tests

You can run tests for all libraries and the web app using the following command:

nx run-many -t test

Or, you can run tests for a specific library or app:

nx test <project>

You can find the name of the project in the project.json file of the respective library or app folder.

Linting

If you are using an IDE that supports Eslint & Prettier, I highly recommend enabling automatic linting on save. This will ensure that any code you write adheres to the code style I've set up for this project (meaning fewer headaches for everyone!)

To lint the project, run the following command:

nx run-many -t lint

Or, you can link specific libraries or apps:

nx lint <project>

You can find the name of the project in the project.json file of the respective library or app folder.

Generate Sanity types

Run the following command to generate types for Sanity:

nx typegen sanity-studio

This will extract and validate the schema as well as generate types for the Sanity project.

Known Issues

  • High Memory Usage: Due to the complexity of the project, you'll need at least 7GB of RAM for development.
  • Environment Setup: Ensure all API keys are correctly configured in Doppler. Missing keys will result in errors.

Contributing

Contributions are welcome! 🎉

To contribute:

  1. Fork this repository.
  2. Create a new branch for your feature or bugfix: git checkout -b feature/my-feature.
  3. Make your changes and commit them: git add . && git cz.
  4. Push to your fork: git push origin feature/my-feature.
  5. Create a pull request, and I’ll review it as soon as possible!

Please ensure your code follows the existing style and includes tests for any new functionality.

License

This project is licensed under the MIT License. You are free to use, modify, and distribute this project, provided you include the original copyright and license.

About

My professional development portfolio website, built with NextJS, Sanity CMS, TailwindCSS, and TypeScript

Topics

Resources

License

Stars

Watchers

Forks