π Available at: devj2k.com
This is the code repository for my personal portfolio website, devj2k.com. It showcases my projects, skills, and experiences in the field of software development.
Note
It was initially built with
Nuxt(see nuxt version), then migrated toNext.js(see next version) for the frontend. The backend is powered by the Python frameworkFastAPIand uses Mistral models for AI functionalities.
-
Frontend: Next.js, TypeScript, Tailwind CSS
-
Deployment: Docker
Follow the steps below to set up and run the project locally:
git clone https://github.com/DevJ2K/portfolio_v2.git && cd portfolio_v22. Ensure you have Docker installed on your machine.
Run the following script to create the necessary .env files:
chmod +x ./env/create-env.sh && ./env/create-env.shFill in the generated .env files located in the env directory with these values:
.env-dev-backend:
MISTRAL_API_KEY=Your_Mistral_API_Key # https://console.mistral.ai/api-keys
MISTRAL_MODEL=Mistral_model_name # https://docs.mistral.ai/getting-started/models/models_overview (recommended: mistral-small-latest)
OLLAMA_MODEL=hf.co/bartowski/granite-embedding-107m-multilingual-GGUF
EMAIL_RECEIVER=
EMAIL_SENDER=
PASSWORD_SENDER=
API_KEY=J2K-PORTFOLIO-Backend-API-KEY
PROXY_STATUS=disabled
DISCORD_WEBHOOK_URL=Notes:
The empty variables are optional and only used for the contact form feature.
MISTRAL_API_KEY, MISTRAL_MODEL and OLLAMA_MODEL are required for AI functionalities.
Don't change the default value of OLLAMA_MODEL.
API_KEY secures backend API endpoints when PROXY_STATUS is set to
enabled.
.env-dev-frontend:
API_BASE_URL=http://backend:4000
API_KEY=J2K-PORTFOLIO-Backend-API-KEYNote:
API_KEY must match the one defined in
.env-dev-backend.API_BASE_URL is the URL of the backend service.
Use Docker Compose to build and run the application:
docker-compose -f docker-compose-dev.yml up -d backend frontendYou can check the logs of both services with:
docker-compose -f docker-compose-dev.yml logs -fYou can check if the services are ready by running:
docker-compose -f docker-compose-dev.yml logs | grep 'Application startup complete' && echo True || echo Falsedocker-compose -f docker-compose-dev.yml logs | grep 'http://localhost:4000' && echo True || echo FalseOnce both commands return True, the application is ready.
- The frontend will be accessible at
http://localhost:4000. - The backend at
http://localhost:4001. The automatic API documentation is available athttp://localhost:4001/docs.
docker-compose -f docker-compose-dev.yml downTo remove all Docker resources (containers, images, volumes, and orphans) related to this project, run:
docker-compose -f docker-compose-dev.yml down --rmi all --volumes --remove-orphans