CodeLink is a backend platform that allows developers to create and share their portfolio-like profile, including their tech stack, skills, and notable projects. The main idea is that anyone can publicly browse developer profiles via a well-designed API, while each dev can securely manage their information through authentication.
⚡ All backend and API development must be done using BunJS, taking advantage of its speed and TypeScript support.
-
Centralize developer profiles in a public API.
-
Provide developers a space to showcase:
- Their tech stack.
- Main skills.
- Relevant projects.
-
Provide a secure authentication system so users can keep their portfolio up-to-date.
-
Design a modular and scalable backend, independent of the frontend (React, SolidJS, mobile apps, etc).
The project follows clean architecture principles, separating layers to keep the code maintainable and scalable.
- Runtime / Development: BunJS ⚡
- Backend Framework: HonoJS
- Language: TypeScript
- Database / ORM: TursoDB + Prisma
- Authentication: JWT with refresh token rotation
- Cache / Sessions: Redis
- Validations: Zod
- Dependency Injection: tsyringe
- Logger: pino (configurable)
TursoDB is a distributed database that provides scalability and performance. Prisma is used as the ORM for mapping entities and handling migrations.
- Users: registration, login, basic profile.
- Profiles: tech stack, skills, and projects.
- Auth: login with JWT, refresh tokens, secure sessions.
- Shared: common utilities (logger, Result, error handling, etc).
- Login → generates
accessToken
+refreshToken
. - AccessToken → used in private calls (short-lived).
- RefreshToken → allows requesting new tokens.
- Secure Rotation → regenerating tokens creates a new session and revokes the old one.
POST /auth/register → Create account
POST /auth/login → Login
POST /auth/refresh → Rotate tokens
GET /profiles/:id → View public profile
GET /profiles → List profiles
PUT /profiles/me → Update my profile (auth required)
git clone https://github.com/SammyBytes/CodeLink.git
cd CodeLink
bun install
Create a .env
file based on .env.example
:
# TursoDB
TURSO_DATABASE_URL="your_turso_url"
TURSO_AUTH_TOKEN="your_auth_token"
# Redis
REDIS_URL="redis://localhost:6379"
REDIS_USERNAME="default",
REDIS_PORT=6739
REDIS_PASSWORD="your_redis_password"
# JWT
JWT_SECRET="super-secret"
generator client {
provider = "prisma-client-js"
output = "../src/generated/prisma"
previewFeatures = ["driverAdapters"]
}
datasource db {
provider = "sqlite"
url = "file:./dev.db"
}
bunx prisma migrate dev
In production, apply SQL scripts directly in TursoDB as per the official documentation.
bun run dev
Server running at http://localhost:3000 🚀
.
Contributions are welcome! Typical steps:
- Fork the repo.
- Make changes in a new branch (
feature/my-feature
). - Open a PR describing the improvement or fix.
- Basic JWT authentication.
- Session management with Redis.
- CRUD for developer profiles.
- Public API with filters (stack, skills, projects).
- Automated tests (unit + integration).
- OpenAPI/Swagger documentation.
- CI/CD pipeline.
MIT License. Free to use and modify.