This document contains contribution guidelines and development standards for the LivroLog project.
LivroLog is a personal library management system composed of:
- Laravel API: REST API backend with Docker
- Vue.js + Quasar Frontend: TypeScript SPA with Vite
- Google Books API Integration: For book search
- Architecture: Decoupled API + SPA
- Laravel with PHP
- MySQL for persistence
- Redis for cache/sessions
- Docker for containerization
- Swagger for API documentation
- Vue.js 3 + Composition API
- Quasar Framework for UI/UX
- TypeScript with strict mode
- Pinia for state management
- Vite for build and development
- Yarn as package manager
Always use Yarn (never npm):
# ✅ Correct
yarn install
yarn dev
# ❌ Avoid
npm installProject uses Yarn 4.0 with Corepack for version consistency.
- Always prefix with
_ - Organize alphabetically
state: () => ({
_books: [] as Book[],
_isLoading: false
}),- No
getprefix - Organize alphabetically
getters: {
books: (state) => state._books,
isLoading: (state) => state._isLoading
},- Use
.then(),.catch(),.finally()instead ofasync/await - Manage loading states properly
fetchBooks() {
this._isLoading = true
return api.get('/books')
.then((response) => this.$patch({ _books: response.data }))
.catch((error) => Notify.create({ message: error.response.data.message, type: 'negative' }))
.finally(() => this._isLoading = false)
}- Use centralized
utils/axios.ts - Follow "projeto modelo" pattern
- Avoid classes in stores
- Use interceptors for auth and error handling
- Strict mode enabled
- Resolve ALL lint/type errors before commit
- Use explicit interfaces
- Avoid
any- use specific types
- English only
- Focus on "why", not "what"
- Document complex logic and business decisions
src/
├── components/ # Reusable components
├── models/ # TypeScript interfaces
├── router/ # Route configuration
├── stores/ # Pinia stores
├── utils/ # Utilities (axios, helpers)
├── views/ # Main pages
└── i18n/ # Internationalization
app/Http/Controllers/Api/ # API controllers
app/Models/ # Eloquent models
routes/api.php # API routes (/*)
- Main branch:
main - Development:
dev - Features:
feature/feature-name
- Descriptive messages in English
- Use conventional commits when possible
- Atomic commits (one change per commit)
- Develop API endpoints first
- Document with Swagger
- Test with cURL/Postman before frontend
yarn type-check # TypeScript validation
yarn build # Production builddocker exec livrolog-api php artisan testThe project runs with 5 containers:
- nginx: Reverse proxy (port 8000)
- api: Laravel API
- database: MySQL
- redis: Cache
- frontend: Node.js dev server (port 8001)
# Useful commands
docker ps # Container status
docker logs livrolog-api # View logs
docker exec livrolog-api php artisan migrate- Base:
/ - Auth:
/auth/{login,register,logout,me} - Books:
/books/ - Documentation:
/documentation(Swagger)
- Vue.js SPA with vue-router
- Bearer token authentication
- Auto-logout on 401 responses
- Login/Register → receive
access_token - Store token in
localStorage - Axios interceptor adds
Bearer {token} - Logout clears token and redirects
interface AuthResponse {
user: User
access_token: string
token_type: string
}- Quasar Framework components
- Dark/Light mode support
- Mobile-first responsive design
- Use
$q.notify()for user feedback
- ❌ Using
npminstead ofyarn - ❌ Classes and constructors in Pinia stores
- ❌ Unnecessary
try/catch(use.then().catch()) - ❌
getprefixes in getters - ❌ States without
_prefix - ❌ Comments in Portuguese
- ❌ Direct commits to
main - ❌ Code without type checking
yarn type-checkpasses- Code formatted and linted
- Comments in English
- API documented (if new endpoint)
- Manual functionality test
- No forgotten
console.log - Store states with
_prefix - Getters organized alphabetically
For questions about contributions or standards:
- Author: Arnon Rodrigues
- Email: arnonrdp@gmail.com
- Website: https://arnon.dev
This document should be updated as the project evolves and new standards are established.