Your virtual bookshelf and reading social network
LerTraça is a Brazilian platform for readers to organize their books, track reading stats, and connect with other readers.
- Book search via Google Books and Open Library
- Status tracking: Want to Read, Reading, Read, Abandoned
- Half-star ratings (0.5 to 5)
- Notes and quotes per book
- Re-read tracking
- Custom tags
- Spine view with colors extracted from covers
- Drag & drop reordering
- Book opening animation
- 6 shelf themes
- Public profiles
- Follower system
- Activity feed
- Likes and comments
- Quote sharing
- Reading dashboard with charts
- Activity calendar (heatmap)
- Yearly reading goals
- Annual retrospective (LerTraça Wrapped)
- Points and coins system
- 19 unlockable achievements
- Profile badges
- Leaderboard
- Visual card generation when finishing books
- Stories and Feed formats
- Colors based on book cover
| Layer | Technology |
|---|---|
| Framework | Next.js 15 (App Router) |
| Language | TypeScript (strict mode) |
| Styling | Tailwind CSS 4 |
| Database | PostgreSQL (Neon) |
| ORM | Prisma |
| Authentication | NextAuth.js v5 |
| Hosting | Vercel |
| Animations | Framer Motion |
| Charts | Recharts |
| Validation | Zod |
- Node.js 20+
- pnpm 8+
- PostgreSQL (or a Neon account)
- Clone the repository:
git clone https://github.com/Kettss1/lertraca.git
cd lertraca- Install dependencies:
pnpm install- Set up environment variables:
cp .env.example .env.localFill in the variables:
DATABASE_URL="postgresql://..."
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-here"
GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."
GOOGLE_BOOKS_API_KEY="..."
NEXT_PUBLIC_APP_URL="http://localhost:3000"- Set up the database:
pnpm db:push
pnpm db:seed- Start the development server:
pnpm devOpen http://localhost:3000.
pnpm dev # Development server
pnpm build # Production build
pnpm start # Start production
pnpm lint # Run linting
pnpm format # Format code
# Database
pnpm db:generate # Generate Prisma client
pnpm db:push # Push schema
pnpm db:migrate # Run migrations
pnpm db:studio # Open Prisma Studio
pnpm db:seed # Seed database with initial datasrc/
├── app/ # Next.js routes (App Router)
│ ├── (auth)/ # Login, register
│ ├── (main)/ # Authenticated pages
│ │ ├── shelf/ # Bookshelf
│ │ ├── book/[id]/ # Book details
│ │ ├── feed/ # Social feed
│ │ ├── stats/ # Statistics
│ │ └── achievements/ # Achievements
│ ├── profile/[username]/ # Public profile
│ └── retrospective/ # Annual retrospective
├── components/
│ ├── ui/ # Base components
│ ├── book/ # Book components
│ ├── shelf/ # Shelf components
│ ├── social/ # Feed, comments, follow
│ ├── stats/ # Charts and widgets
│ └── gamification/ # Achievements, badges
├── lib/
│ ├── actions/ # Server Actions
│ ├── services/ # Business logic
│ ├── api/ # External integrations
│ └── validators/ # Zod schemas
├── hooks/ # Custom React hooks
└── types/ # TypeScript types
- TypeScript strict mode always
- Server Components by default
"use client"only when necessary- Zod validation before any database operation
- Files:
kebab-case(e.g.,book-detail.tsx) - Components:
PascalCase(e.g.,BookCard) - Hooks:
useprefix (e.g.,useBookSearch)
- Commits in Portuguese
- Format:
feat: adiciona busca de livros,fix: corrige filtro - Branches:
feat/name,fix/description,chore/task
LerTraça uses two APIs to fetch book information:
-
Google Books API (primary)
- Better covers for Brazilian books
- Limit: 1,000 req/day without key
-
Open Library API (fallback)
- No hard limits
- Used when Google Books returns no results
When adding a book, data is saved locally in the Book table for caching.
- Fork the project
- Create a branch (
git checkout -b feat/new-feature) - Commit your changes (
git commit -m 'feat: adds new feature') - Push to the branch (
git push origin feat/new-feature) - Open a Pull Request
This project is private and not licensed for public use.
- Ket - Development
Sua estante virtual e rede social de leitura
LerTraça é uma plataforma brasileira para leitores organizarem seus livros, acompanharem estatísticas de leitura e se conectarem com outros leitores.
- Busca de livros via Google Books e Open Library
- Organização por status: Quero Ler, Lendo, Lido, Abandonado
- Avaliação com meias-estrelas (0.5 a 5)
- Anotações e citações por livro
- Marcação de releituras
- Tags personalizadas
- Visualização em lombadas com cores extraídas das capas
- Drag & drop para reordenar
- Animação de abertura de livro
- 6 temas de prateleira
- Perfis públicos
- Sistema de seguidores
- Feed de atividades
- Curtidas e comentários
- Compartilhamento de citações
- Dashboard com gráficos de leitura
- Calendário de atividades (heatmap)
- Metas de leitura anuais
- Retrospectiva anual (LerTraça Wrapped)
- Sistema de pontos e moedas
- 19 conquistas desbloqueáveis
- Badges no perfil
- Leaderboard
- Geração de cards visuais ao terminar livros
- Formatos para Stories e Feed
- Cores baseadas na capa do livro
| Camada | Tecnologia |
|---|---|
| Framework | Next.js 15 (App Router) |
| Linguagem | TypeScript (strict mode) |
| Estilização | Tailwind CSS 4 |
| Banco de Dados | PostgreSQL (Neon) |
| ORM | Prisma |
| Autenticação | NextAuth.js v5 |
| Hospedagem | Vercel |
| Animações | Framer Motion |
| Gráficos | Recharts |
| Validação | Zod |
- Node.js 20+
- pnpm 8+
- PostgreSQL (ou conta no Neon)
- Clone o repositório:
git clone https://github.com/Kettss1/lertraca.git
cd lertraca- Instale as dependências:
pnpm install- Configure as variáveis de ambiente:
cp .env.example .env.localPreencha as variáveis:
DATABASE_URL="postgresql://..."
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="seu-secret-aqui"
GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."
GOOGLE_BOOKS_API_KEY="..."
NEXT_PUBLIC_APP_URL="http://localhost:3000"- Configure o banco de dados:
pnpm db:push
pnpm db:seed- Inicie o servidor de desenvolvimento:
pnpm devAcesse http://localhost:3000.
pnpm dev # Servidor de desenvolvimento
pnpm build # Build de produção
pnpm start # Iniciar produção
pnpm lint # Verificar linting
pnpm format # Formatar código
# Banco de dados
pnpm db:generate # Gerar cliente Prisma
pnpm db:push # Push do schema
pnpm db:migrate # Executar migrações
pnpm db:studio # Abrir Prisma Studio
pnpm db:seed # Popular banco com dados iniciaissrc/
├── app/ # Rotas Next.js (App Router)
│ ├── (auth)/ # Login, registro
│ ├── (main)/ # Páginas autenticadas
│ │ ├── shelf/ # Estante
│ │ ├── book/[id]/ # Detalhes do livro
│ │ ├── feed/ # Feed social
│ │ ├── stats/ # Estatísticas
│ │ └── achievements/ # Conquistas
│ ├── profile/[username]/ # Perfil público
│ └── retrospective/ # Retrospectiva anual
├── components/
│ ├── ui/ # Componentes base
│ ├── book/ # Componentes de livro
│ ├── shelf/ # Componentes da estante
│ ├── social/ # Feed, comentários, follow
│ ├── stats/ # Gráficos e widgets
│ └── gamification/ # Conquistas, badges
├── lib/
│ ├── actions/ # Server Actions
│ ├── services/ # Lógica de negócio
│ ├── api/ # Integrações externas
│ └── validators/ # Schemas Zod
├── hooks/ # React hooks customizados
└── types/ # TypeScript types
- TypeScript strict mode sempre
- Componentes Server por padrão
"use client"apenas quando necessário- Validação com Zod antes de tocar no banco
- Arquivos:
kebab-case(ex:book-detail.tsx) - Componentes:
PascalCase(ex:BookCard) - Hooks: prefixo
use(ex:useBookSearch)
- Commits em português
- Formato:
feat: adiciona busca de livros,fix: corrige filtro - Branches:
feat/nome,fix/descricao,chore/tarefa
O LerTraça usa duas APIs para buscar informações de livros:
-
Google Books API (principal)
- Melhores capas para livros brasileiros
- Limite: 1000 req/dia sem key
-
Open Library API (fallback)
- Sem limites rígidos
- Usado quando Google Books não retorna resultado
Ao adicionar um livro, os dados são salvos localmente na tabela Book para cache.
- Fork o projeto
- Crie uma branch (
git checkout -b feat/nova-feature) - Commit suas mudanças (
git commit -m 'feat: adiciona nova feature') - Push para a branch (
git push origin feat/nova-feature) - Abra um Pull Request
Este projeto é privado e não está licenciado para uso público.
- Ket - Desenvolvimento
Made with books in Brazil