A modern, multilingual platform where people from around the world share practical life tricks and tips. Built with Next.js, AWS DynamoDB, and Cognito authentication.
Production: tricky-peach.vercel.app
- Browse Tricks: Discover life hacks from 20+ countries in native languages
- Submit Tricks: Share your own tips with the global community
- Interactive Engagement: Give kudos, comment, and view trick details
- Country Filtering: Filter tricks by specific countries using the dynamic country chain
- Search: Find tricks by title, description, or tags across all content
- Multilingual Content: Tricks in Turkish, Japanese, French, Hindi, Portuguese, Arabic, Russian, Chinese, and more
- Country Representation: ๐น๐ท Turkey, ๐ฏ๐ต Japan, ๐ฉ๐ช Germany, ๐ซ๐ท France, ๐ฌ๐ง UK, ๐ฎ๐น Italy, ๐ช๐ธ Spain, ๐จ๐ฆ Canada, ๐ฆ๐บ Australia, ๐ง๐ท Brazil, ๐ฎ๐ณ India, ๐จ๐ณ China, ๐ฐ๐ท South Korea, ๐ฒ๐ฝ Mexico, ๐ณ๐ฑ Netherlands, ๐ธ๐ช Sweden, ๐ณ๐ด Norway, ๐ฉ๐ฐ Denmark, ๐ซ๐ฎ Finland, ๐จ๐ญ Switzerland, ๐ท๐บ Russia, ๐ช๐ฌ Egypt
- Dynamic Country Chain: Animated bike chain showing trick counts per country
- User Authentication: AWS Cognito integration with email-based login
- User Profiles: Track personal stats, submitted tricks, and kudos received
- Leaderboard: Top contributors ranked by community engagement
- Comments System: Real-time commenting on tricks
- Top 10 Tricks: Dynamic ranking based on community kudos
- Real-time Updates: Live trick counts, view tracking, and engagement metrics
- Responsive Design: Mobile-first approach with smooth animations
- Performance Optimized: Fast loading with efficient data fetching
- Error Handling: Robust error handling and graceful degradation
- Next.js 14 - React framework with SSR/SSG
- TypeScript - Type-safe development
- CSS-in-JS - Styled JSX for component styling
- AWS Amplify UI - Authentication components
- AWS DynamoDB - NoSQL database for tricks, users, and comments
- AWS Cognito - User authentication and management
- Next.js API Routes - Serverless API endpoints
- Vercel - Frontend hosting with automatic deployments
- GitHub Actions - CI/CD pipeline with automated testing
- AWS - Backend services and data storage
- Node.js 18+ and npm
- AWS Account with DynamoDB and Cognito access
- Git
- Clone the repository:
git clone https://github.com/ZAKGUN12/tricky.git
cd tricky
- Install dependencies:
npm install
- Set up environment variables:
cp .env.local.example .env.local
Edit .env.local
with your AWS credentials:
AWS_REGION=eu-west-1
AWS_ACCESS_KEY_ID=your_access_key_here
AWS_SECRET_ACCESS_KEY=your_secret_key_here
- Set up AWS infrastructure:
# Create DynamoDB tables
node scripts/setup-db.js
# Populate with sample data
node scripts/populate-db.js
node scripts/add-more-data.js
- Run development server:
npm run dev
Visit http://localhost:3000 to see the application.
{
id: string, // Primary key
title: string,
description: string,
steps: string[], // Array of step instructions
country: string, // Country name
countryCode: string, // ISO country code
difficulty: 'easy' | 'medium' | 'hard',
tags: string[], // Searchable tags
authorName: string,
authorEmail: string,
kudos: number, // Community likes
views: number, // View count
comments: number, // Comment count
status: 'approved', // Moderation status
createdAt: string // ISO timestamp
}
{
email: string, // Primary key
score: number, // Total points
tricksSubmitted: number,
kudosReceived: number,
createdAt: string
}
{
trickId: string, // Partition key
id: string, // Sort key
text: string,
authorName: string,
createdAt: string
}
GET /api/tricks
- List all tricks with filteringPOST /api/tricks
- Create new trickGET /api/tricks/[id]
- Get specific trickPOST /api/tricks/[id]/kudos
- Give kudos to trickPOST /api/tricks/[id]/view
- Increment view countGET /api/tricks/top
- Get top 10 tricks by kudos
GET /api/tricks/[id]/comments
- Get trick commentsPOST /api/tricks/[id]/comments
- Add comment
GET /api/users/stats
- Get user statisticsGET /api/leaderboard
- Get top contributors
Dynamic bike chain animation showing countries with trick counts. Features:
- Circular chain links with country flags
- Real-time trick counts per country
- Smooth animations and hover effects
- Mobile responsive design
Real-time top 10 tricks based on community engagement:
- Live data from API
- Ranking with crown icons for top 3
- Click-through to full trick details
- Loading states and error handling
Individual trick display with:
- Country flag and author info
- Difficulty indicators
- Tag system
- Engagement metrics (kudos, views, comments)
- Responsive design
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run type-check # Run TypeScript checks
- ESLint - Code linting with Next.js rules
- TypeScript - Type checking
- Husky - Pre-commit hooks
- GitHub Actions - Automated CI/CD
โโโ components/ # Reusable React components
โโโ lib/ # Utility functions and configurations
โโโ pages/ # Next.js pages and API routes
โ โโโ api/ # Backend API endpoints
โ โโโ trick/ # Dynamic trick pages
โโโ scripts/ # Database setup and population scripts
โโโ styles/ # Global CSS styles
โโโ public/ # Static assets
The platform supports content in multiple languages:
- English - Primary interface language
- Turkish - รay demleme, mutfak hileleri
- Japanese - ็ๆดปใฎใณใใๆ้คๆนๆณ
- French - Astuces de vie, nettoyage
- German - Lebenstipps, Haushaltstricks
- Spanish - Trucos de vida, cocina
- Portuguese - Dicas de vida, limpeza
- Hindi - เคเฅเคตเคจ เคเฅ เคคเคฐเคเฅเคฌเฅเค
- Chinese - ็ๆดปๅฐ็ช้จ
- Arabic - ุญูู ุงูุญูุงุฉ
- Russian - ะะฐะนัั ะฐะบะธ
- Responsive design optimized for mobile devices
- Touch-friendly interface elements
- Optimized country chain for small screens
- Mobile-first CSS approach
- AWS Cognito authentication
- Input validation and sanitization
- CORS protection
- Environment variable protection
- Secure API endpoints
- Connect GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main branch
npm run build
npm run start
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Community contributors from around the world
- AWS for reliable cloud infrastructure
- Vercel for seamless deployment
- Next.js team for the excellent framework
For support, email [email protected] or create an issue on GitHub.
Built with โค๏ธ by the global community