initial: Backend Auth Module + Design System + Complete Documentation
- Setup NestJS with TypeScript, ConfigModule, JWT authentication - Implemented Auth Module with signup, login, logout endpoints - Created DTOs with validation (SignupDto, LoginDto) - JWT Strategy with Passport integration for token validation - JwtAuthGuard for route protection with Bearer tokens - CurrentUser decorator for dependency injection - Supabase integration for user management and auth - Complete API documentation (API.md) with all endpoints - Design System for Web (Next.js + Tailwind) and Mobile (Flutter) - Comprehensive project documentation and roadmap - Environment configuration with Joi schema validation - Ready for Tasks Module and RLS implementation
This commit is contained in:
215
README.md
Normal file
215
README.md
Normal file
@@ -0,0 +1,215 @@
|
||||
# 📱 TASK MANAGER - Aplicação Multi-Plataforma
|
||||
|
||||
> Uma aplicação fullstack moderna de gerenciamento de tarefas com sincronização em tempo real, desenvolvida com **NestJS**, **Next.js**, **Flutter** e **Supabase**.
|
||||
|
||||
## 🎯 Objetivo
|
||||
|
||||
Criar uma aplicação multi-plataforma sincronizada em tempo real para estudar desenvolvimento fullstack moderno com TypeScript.
|
||||
|
||||
## 🛠️ Stack Tecnológica
|
||||
|
||||
### Backend
|
||||
- **NestJS 11** - Framework Node.js com TypeScript
|
||||
- **Supabase** - PostgreSQL + Auth + Realtime
|
||||
- **TypeScript 5.7**
|
||||
- **Docker** - Containerização
|
||||
|
||||
### Frontend Web
|
||||
- **Next.js 16** - React com App Router
|
||||
- **TailwindCSS 4** - Utility-first CSS
|
||||
- **TypeScript 5**
|
||||
- **Supabase Client**
|
||||
|
||||
### Mobile
|
||||
- **Flutter** - Framework multi-plataforma (Android/iOS)
|
||||
- **Dart** - Linguagem do Flutter
|
||||
- **Provider** - State management
|
||||
- **Supabase Flutter SDK**
|
||||
|
||||
## 📋 Funcionalidades (MVP)
|
||||
|
||||
### ✅ Autenticação
|
||||
- [x] Estrutura de autenticação
|
||||
- [ ] Cadastro de usuário (email + senha)
|
||||
- [ ] Login
|
||||
- [ ] Logout
|
||||
- [ ] Recuperação de senha
|
||||
- [ ] Sessão persistente
|
||||
|
||||
### ✅ Gerenciamento de Tarefas
|
||||
- [ ] Criar tarefa
|
||||
- [ ] Listar tarefas do usuário
|
||||
- [ ] Marcar como concluída/pendente
|
||||
- [ ] Editar tarefa
|
||||
- [ ] Deletar tarefa
|
||||
- [ ] Filtrar (Todas/Ativas/Concluídas)
|
||||
|
||||
### ✅ Sincronização em Tempo Real
|
||||
- [ ] Supabase Realtime (WebSockets)
|
||||
- [ ] Sincronização web ↔ mobile
|
||||
- [ ] Atualização automática em múltiplos dispositivos
|
||||
|
||||
## 📁 Estrutura do Projeto
|
||||
|
||||
```
|
||||
to-do-list/
|
||||
├── backend-api/ # NestJS API
|
||||
│ ├── src/
|
||||
│ │ ├── auth/ # Módulo de autenticação
|
||||
│ │ ├── tasks/ # Módulo de tarefas
|
||||
│ │ ├── config/ # Configurações
|
||||
│ │ ├── common/ # Utilitários comuns
|
||||
│ │ └── main.ts
|
||||
│ ├── .env.example
|
||||
│ └── package.json
|
||||
│
|
||||
├── frontend-next/ # Next.js Web
|
||||
│ ├── src/
|
||||
│ │ ├── app/ # App Router pages
|
||||
│ │ ├── components/ # Componentes reutilizáveis
|
||||
│ │ ├── lib/ # Utilitários
|
||||
│ │ └── styles/ # Estilos globais
|
||||
│ ├── .env.example
|
||||
│ └── package.json
|
||||
│
|
||||
├── mobile/ # Flutter (TODO)
|
||||
│ ├── lib/
|
||||
│ ├── pubspec.yaml
|
||||
│ └── .env.example
|
||||
│
|
||||
├── docs/ # Documentação
|
||||
│ ├── instrucoes-gerais.md
|
||||
│ └── instrucoes-design.md
|
||||
│
|
||||
├── ROADMAP_EXECUCAO.md # Roadmap detalhado
|
||||
├── .gitignore
|
||||
└── README.md # Este arquivo
|
||||
```
|
||||
|
||||
## 🚀 Começando
|
||||
|
||||
### Pré-requisitos
|
||||
- Node.js 20+
|
||||
- npm ou yarn
|
||||
- Conta Supabase ativa
|
||||
- Flutter SDK (para mobile)
|
||||
|
||||
### Setup Backend
|
||||
|
||||
```bash
|
||||
cd backend-api
|
||||
npm install
|
||||
cp .env.example .env
|
||||
# Preencha as variáveis de ambiente
|
||||
npm run start:dev
|
||||
```
|
||||
|
||||
Backend rodará em: `http://localhost:3000/api`
|
||||
|
||||
### Setup Frontend Web
|
||||
|
||||
```bash
|
||||
cd frontend-next
|
||||
npm install
|
||||
cp .env.example .env.local
|
||||
# Preencha as variáveis de ambiente
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Frontend rodará em: `http://localhost:3000`
|
||||
|
||||
### Setup Mobile (Em Breve)
|
||||
|
||||
```bash
|
||||
cd mobile
|
||||
flutter pub get
|
||||
# Configurar .env
|
||||
flutter run
|
||||
```
|
||||
|
||||
## 📖 Documentação
|
||||
|
||||
Veja os arquivos de documentação:
|
||||
- **[instrucoes-gerais.md](./docs/instrucoes-gerais.md)** - Plano geral do projeto
|
||||
- **[instrucoes-design.md](./docs/instrucoes-design.md)** - Design System
|
||||
- **[ROADMAP_EXECUCAO.md](./ROADMAP_EXECUCAO.md)** - Roadmap detalhado
|
||||
|
||||
## 🔐 Variáveis de Ambiente
|
||||
|
||||
### Backend (.env)
|
||||
```
|
||||
SUPABASE_URL=https://supabase.stackbackup.cloud
|
||||
SUPABASE_ANON_KEY=your_key
|
||||
SUPABASE_SERVICE_KEY=your_key
|
||||
JWT_SECRET=your_secret_min_32_chars
|
||||
JWT_EXPIRATION=7d
|
||||
NODE_ENV=development
|
||||
PORT=3000
|
||||
CORS_ORIGIN=http://localhost:3000
|
||||
```
|
||||
|
||||
### Frontend (.env.local)
|
||||
```
|
||||
NEXT_PUBLIC_SUPABASE_URL=https://supabase.stackbackup.cloud
|
||||
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key
|
||||
```
|
||||
|
||||
## 📊 Progresso
|
||||
|
||||
```
|
||||
Fase 1: Backend [████████░░] 45%
|
||||
✅ Setup & Config
|
||||
✅ Módulo Auth
|
||||
⏳ Módulo Tasks
|
||||
⏳ RLS & Docs
|
||||
|
||||
Fase 2: Frontend [██░░░░░░░░] 5%
|
||||
⏳ Setup & Config
|
||||
⏳ Componentes
|
||||
⏳ Autenticação
|
||||
⏳ Tarefas
|
||||
|
||||
Fase 3: Mobile [░░░░░░░░░░] 0%
|
||||
⏳ Projeto Flutter
|
||||
⏳ Auth
|
||||
⏳ Telas
|
||||
|
||||
Fase 4: DevOps [░░░░░░░░░░] 0%
|
||||
⏳ Docker
|
||||
⏳ Deploy
|
||||
```
|
||||
|
||||
## 🔗 Referências
|
||||
|
||||
- [NestJS Documentation](https://docs.nestjs.com)
|
||||
- [Next.js Documentation](https://nextjs.org/docs)
|
||||
- [Flutter Documentation](https://flutter.dev/docs)
|
||||
- [Supabase Documentation](https://supabase.com/docs)
|
||||
- [TypeScript Handbook](https://www.typescriptlang.org/docs/)
|
||||
|
||||
## 📝 API Endpoints
|
||||
|
||||
### Auth
|
||||
- `POST /api/auth/signup` - Registrar usuário
|
||||
- `POST /api/auth/login` - Fazer login
|
||||
- `POST /api/auth/logout` - Fazer logout
|
||||
- `GET /api/auth/me` - Perfil atual
|
||||
- `POST /api/auth/forgot-password` - Recuperar senha
|
||||
|
||||
### Tasks (Em desenvolvimento)
|
||||
- `GET /api/tasks` - Listar tarefas
|
||||
- `POST /api/tasks` - Criar tarefa
|
||||
- `PATCH /api/tasks/:id` - Atualizar tarefa
|
||||
- `DELETE /api/tasks/:id` - Deletar tarefa
|
||||
|
||||
## 🤝 Contribuindo
|
||||
|
||||
Este é um projeto de aprendizado. Sinta-se livre para abrir issues e PRs.
|
||||
|
||||
## 📄 Licença
|
||||
|
||||
MIT
|
||||
|
||||
---
|
||||
|
||||
**Desenvolvido com ❤️ como projeto de aprendizado fullstack**
|
||||
Reference in New Issue
Block a user