A full-stack Pokédex application built with Next.js 15 and Node.js 24, featuring comprehensive Pokemon information, search, and filtering capabilities.
- Authentication: Secure login system with session management
- Pokemon List: Paginated list of Pokemon with search and sort functionality
- Pokemon Details: Comprehensive information including abilities, moves, stats, and forms
- Responsive Design: Mobile-first approach with full responsive support
- SEO Optimized: Meta tags, semantic HTML, and OpenGraph support
- Atomic Design: Well-organized component architecture
- Type Safe: Full TypeScript implementation
- Tested: Unit tests for utilities and components
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- State Management: Zustand
- HTTP Client: Axios
- Testing: Jest + React Testing Library
- Runtime: Node.js 24
- Framework: Express.js 5
- Data Source: PokeAPI
- Authentication: Bearer token with in-memory sessions
pokedex/
├── backend/ # Backend API
│ ├── src/
│ │ ├── config/ # Configuration files
│ │ ├── controllers/ # Request handlers
│ │ ├── middleware/ # Custom middleware
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic
│ │ └── index.js # Server entry point
│ └── package.json
├── frontend/ # Frontend application
│ ├── app/ # Next.js pages
│ │ ├── login/ # Login page
│ │ ├── pokemon/[id]/ # Pokemon detail page
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Home page
│ ├── components/ # React components
│ │ ├── atoms/ # Basic components
│ │ ├── molecules/ # Composed components
│ │ ├── organisms/ # Complex components
│ │ └── templates/ # Page templates
│ ├── constants/ # Constants and config
│ ├── enums/ # TypeScript enums
│ ├── lib/ # API client
│ ├── store/ # Zustand stores
│ ├── types/ # TypeScript types
│ ├── utils/ # Utility functions
│ └── __tests__/ # Unit tests
├── USER_STORIES.md # User stories
├── GENAI_TASK_README.md # GenAI task documentation
└── AI_PROMPTS_AND_EDITS.md # AI development log
- Node.js 20.9.0 or higher (Note: Node 24 not yet released, using Node 20+)
- npm or yarn
- GitHub CLI (for repository creation)
-
Clone the repository
git clone https://github.com/MaferG/pokedex.git cd pokedex -
Install Backend Dependencies
cd backend npm install -
Install Frontend Dependencies
cd ../frontend npm install
-
Start the Backend
cd backend npm run devBackend will run on http://localhost:3001
-
Start the Frontend (in a new terminal)
cd frontend npm run devFrontend will run on http://localhost:3000
-
Access the Application
- Open http://localhost:3000 in your browser
- Login with credentials:
admin / admin
Authenticate user and receive session token.
Request:
{
"username": "admin",
"password": "admin"
}Response:
{
"success": true,
"token": "session_token_here",
"expiresAt": 1234567890,
"message": "Login successful"
}Get paginated list of Pokemon.
Query Parameters:
limit(optional): Number per page (1-100, default: 20)offset(optional): Starting position (default: 0)search(optional): Search by name
Headers:
Authorization: Bearer <token>
Response:
{
"count": 1328,
"next": "...",
"previous": null,
"results": [
{
"id": 1,
"name": "bulbasaur",
"url": "...",
"image": "..."
}
]
}Get detailed Pokemon information.
Headers:
Authorization: Bearer <token>
Response:
{
"id": 1,
"name": "bulbasaur",
"height": 7,
"weight": 69,
"images": {...},
"types": [...],
"abilities": [...],
"moves": [...],
"stats": [...],
"species": {...}
}cd frontend
npm test # Run tests once
npm run test:watch # Watch mode
npm run test:coverage # With coverage report- Utility functions: 100%
- Validation logic: 100%
- Sort/filter functions: 100%
- Create User Story in USER_STORIES.md
- Backend Changes (if needed):
- Add service in
backend/src/services/ - Add controller in
backend/src/controllers/ - Add route in
backend/src/routes/ - Add JSDoc documentation
- Add service in
- Frontend Changes:
- Follow Atomic Design principles
- Add types in
frontend/types/ - Create components in appropriate folder
- Add JSDoc documentation
- Create tests in
frontend/__tests__/
- TypeScript: Use strict mode, avoid
any - Components: Functional components with TypeScript
- Documentation: JSDoc for all functions and components
- Naming:
- Components: PascalCase
- Functions/variables: camelCase
- Constants: UPPER_SNAKE_CASE
- File Structure: One component per file
- Testing: Write tests for utilities and complex logic
Provides clear component hierarchy and maximum reusability. Components are organized from simple to complex:
- Atoms: Basic UI elements (Button, Input)
- Molecules: Simple combinations (PokemonCard, LoginForm)
- Organisms: Complex sections (PokemonGrid, Header)
- Templates: Page layouts (MainLayout)
Lightweight state management with simple API and minimal boilerplate. Perfect for medium-sized applications.
Separates concerns between data/logic (containers) and UI (presentational components), making components more reusable and testable.
See USER_STORIES.md for detailed user stories following the Given-When-Then format with:
- Role
- Complexity (Fibonacci estimation)
- Acceptance criteria
- Definition of Done
See GENAI_TASK_README.md for the TypeScript Table Component implementation for task management with full CRUD functionality.
See AI_PROMPTS_AND_EDITS.md for a comprehensive log of all AI-generated code, prompts used, and human modifications made during development.
PORT=3001
NODE_ENV=developmentNEXT_PUBLIC_API_URL=http://localhost:3001/api- Set environment variables
- Install dependencies:
npm install --production - Start server:
npm start
- Set
NEXT_PUBLIC_API_URLto production backend URL - Build:
npm run build - Start:
npm start
- Backend: Railway, Render, Heroku
- Frontend: Vercel, Netlify
- Database (for production): PostgreSQL, MongoDB
- Session Store (for production): Redis
- In-Memory Sessions: Not suitable for production (use Redis)
- No Database: Pokemon data comes from PokeAPI only
- Basic Auth: Simple admin/admin credentials (implement proper auth for production)
- No Rate Limiting: Should be added for production
- Client-Side Search: Works well for current page only
- Advanced filtering (by type, generation, etc.)
- Pokemon comparison feature
- Favorites/bookmarks system
- Team builder
- Dark mode
- Internationalization (i18n)
- Progressive Web App (PWA)
- E2E testing
- Storybook documentation
- Performance optimizations (image optimization, lazy loading)
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project was created as part of a technical interview assessment.
For questions or feedback about this project, please open an issue on GitHub.
Built with Claude Code - AI-assisted development