chore: clean up repo for public release

- Remove BMAD framework, IDE configs, dev screenshots, test files,
  internal docs, and backup files
- Rename keep-notes/ to memento-note/
- Update all references from keep-notes to memento-note
- Add Apache 2.0 license with Commons Clause (non-commercial restriction)
- Add clean .gitignore and .env.docker.example
This commit is contained in:
Sepehr Ramezani
2026-04-20 22:48:06 +02:00
parent 402e88b788
commit e4d4e23dc7
3981 changed files with 407 additions and 530622 deletions

View File

@@ -0,0 +1,56 @@
import { prisma } from '../lib/prisma'
import { updateSize } from '../app/actions/notes'
async function main() {
console.log('🧪 Starting Note Size Persistence Verification...')
// 1. Create a test note
const note = await prisma.note.create({
data: {
content: 'Size Test Note',
userId: (await prisma.user.findFirst())?.id || '',
size: 'small', // Start small
}
})
console.log(`📝 Created test note (${note.id}) with size: ${note.size}`)
if (!note.userId) {
console.error('❌ No user found to create note. Aborting.')
return
}
try {
// 2. Update size to LARGE
console.log('🔄 Updating size to LARGE...')
// We mock the session for the action or call prisma directly if action fails (actions usually need auth context)
// Since we're running as script, we'll use prisma update directly to simulate what the action does at DB level
// OR we can try to invoke the action if we can mock auth.
// Let's test the DB interaction first which is the critical "persistence" part.
await prisma.note.update({
where: { id: note.id },
data: { size: 'large' }
})
// 3. Fetch back
const updatedNote = await prisma.note.findUnique({ where: { id: note.id } })
console.log(`🔍 Fetched note after update. Size is: ${updatedNote?.size}`)
if (updatedNote?.size === 'large') {
console.log('✅ BACKEND PERSISTENCE: PASSED')
} else {
console.error('❌ BACKEND PERSISTENCE: FAILED (Size reverted or did not update)')
}
} catch (error) {
console.error('❌ Error during test:', error)
} finally {
// Cleanup
await prisma.note.delete({ where: { id: note.id } })
console.log('🧹 Cleaned up test note')
await prisma.$disconnect()
}
}
main().catch(console.error)