Animal Farm is an interactive web application inspired by George Orwell's classic novel. Users can interact with various animals, including a central pig figure, and observe their reactions.
- 🐾 View and interact with different animals
- 🎭 Dynamic pig reactions (neutral, happy, "putin" mode)
- 🍏 Feed animals and influence their state
- 🎵 Background music with Web Audio API
- 🎨 Simple and intuitive design
- Angular
- Angular Material
- Node.js
- NestJS
- MongoDB
- Clone the repository:
git clone https://github.com/your-repo/animal-farm.git cd animal-farm - Install dependencies:
npm install
- Start the backend:
cd backend npm run start - Start the frontend:
cd frontend ng serve - Open
http://localhost:4200in your browser.
GET /api/animals→ Get all animalsPOST /api/animals→ Add a new animalPOST /api/animals/:id/feed→ Feed an animal
GET /api/pig/status→ Get pig's current status
interface Animal {
_id: string;
name: string;
type: string;
thanks: number;
imageUrl: string;
}interface Pig {
pigId: string;
name: string;
currentStatus: 'neutral' | 'happy' | 'putin';
imageUrl: string;
updatedAt: Date;
}When a user feeds an animal, the system:
- Updates the animal's "thanks" count.
- Changes the pig's status based on certain conditions.
- Triggers a visual "thank you" animation.
- Resets the animation after 3 seconds.
Pull requests are welcome. Please ensure your code follows clean code and SOLID principles.
MIT License
🐷 All animals are equal, but some are more equal than others.