Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
42a58aa
feat(utils): create normalize string function
julianosill May 27, 2026
5af3fc4
feat(utils): create `getFileExtension()`
julianosill May 27, 2026
3fd82d4
feat(utils): create `validateFile()`
julianosill May 27, 2026
bfa0052
feat(utils): create `formatSize()`
julianosill May 27, 2026
2e5b3ff
feat(constants): create `MIME_TYPES`
julianosill May 27, 2026
11dd9b0
chore(utils): add jsdoc with instructions to `validateFile()`
julianosill May 27, 2026
0cf9474
feat(storage): create `StorageModule` with use-cases to upload, get s…
julianosill May 27, 2026
238ba4f
feat(common): create `FileValidationPipe`
julianosill May 28, 2026
2284094
feat(storage): create `GenerateSignedCookiesUseCase`
julianosill May 28, 2026
469c094
feat(utils): create `generateFileName()`
julianosill May 29, 2026
9afa795
feat(config): add storage folders
julianosill May 29, 2026
a173ed2
feat(users): implement update user avatar feature
julianosill May 29, 2026
a8c6b3e
chore: fix cryptography service filename
julianosill May 29, 2026
179e956
feat(utils): create cookies utility functions
julianosill May 29, 2026
04edb66
chore(storage): rename use-case to `GenerateCdnCookiesUseCase` for be…
julianosill May 29, 2026
5eb4662
feat(auth): create `GenerateAuthTokensUseCase`
julianosill May 29, 2026
f7d7b5f
chore: use new `GenerateAuthTokensUseCase` on use cases that needs to…
julianosill May 29, 2026
1ef72d2
chore: remove cookies functions from cryptography module
julianosill May 29, 2026
8ec82d2
chore(storage): update cdn policies
julianosill May 30, 2026
2294489
feat(users): remove previous avatar file if new avatar update succeed
julianosill May 30, 2026
0b68cc8
fix(storage): add domain to cdn cookies
julianosill Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ COOKIE_SECRET=super-secret-here
JWT_SECRET=super-secret-here
HASH_PEPPER=super-pepper-here

# Storage
STORAGE_BUCKET_NAME=bucket-name
CDN_PUBLIC_URL=public-cdn-url
CDN_PRIVATE_URL=private-cdn-url

# E-mails
EMAIL_PROVIDER=none
RESEND_KEY=resend-key
Expand All @@ -37,3 +32,10 @@ DB_DATABASE=abnmo_dev
DB_USERNAME=abnmo_user
DB_PASSWORD=abnmo_password
DB_ROOT_PASSWORD=abnmo_root_password

# Storage
STORAGE_BUCKET_NAME=bucket-name
CDN_PUBLIC_URL=cdn-public-url
CDN_PRIVATE_URL=cdn-private-url
CDN_PUBLIC_KEY_ID=cdn-public-key-id
CDN_PRIVATE_KEY=cdn-private-key
12 changes: 7 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ COOKIE_SECRET="super-secret-here"
JWT_SECRET="super-secret-here"
HASH_PEPPER="super-pepper-here"

# Storage
STORAGE_BUCKET_NAME="bucket-name"
CDN_PUBLIC_URL="public-cdn-url"
CDN_PRIVATE_URL="private-cdn-url"

# E-mails
EMAIL_PROVIDER="none"
RESEND_KEY="resend-key"
Expand All @@ -37,3 +32,10 @@ DB_DATABASE="abnmo_dev"
DB_USERNAME="abnmo_user"
DB_PASSWORD="abnmo_password"
DB_ROOT_PASSWORD="abnmo_root_password"

# Storage
STORAGE_BUCKET_NAME="bucket-name"
CDN_PUBLIC_URL="cdn-public-url"
CDN_PRIVATE_URL="cdn-private-url"
CDN_PUBLIC_KEY_ID="cdn-public-key-id"
CDN_PRIVATE_KEY="cdn-private-key"
12 changes: 7 additions & 5 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ COOKIE_SECRET="test-cookie-secret-key-for-testing-only"
JWT_SECRET="test-jwt-secret-key-for-testing-only"
HASH_PEPPER="super-pepper-here"

# Storage
STORAGE_BUCKET_NAME="bucket-name"
CDN_PUBLIC_URL="public-cdn-url"
CDN_PRIVATE_URL="private-cdn-url"

# E-mails
EMAIL_PROVIDER="none"
RESEND_KEY="resend-key"
Expand All @@ -37,3 +32,10 @@ DB_DATABASE="abnmo_test"
DB_USERNAME="abnmo_user"
DB_PASSWORD="abnmo_password"
DB_ROOT_PASSWORD="abnmo_root_password"

# Storage
STORAGE_BUCKET_NAME="bucket-name"
CDN_PUBLIC_URL="cdn-public-url"
CDN_PRIVATE_URL="cdn-private-url"
CDN_PUBLIC_KEY_ID="cdn-public-key-id"
CDN_PRIVATE_KEY="cdn-private-key"
8 changes: 7 additions & 1 deletion infra/database/seed-dev.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { createHmac } from 'node:crypto';

import { faker } from '@faker-js/faker';
import { hash } from 'bcryptjs';
import * as fs from 'fs';
Expand Down Expand Up @@ -46,7 +48,11 @@ function getRandomCity(state: string): string {
}

async function main() {
const password = await hash('12345678', 14);
const pepper = process.env.HASH_PEPPER;
const passwordWithPepper = createHmac('sha256', pepper || '')
.update('12345678')
.digest('base64');
const password = await hash(passwordWithPepper, 14);

try {
await dataSource.initialize();
Expand Down
Loading
Loading