This is a pre-configured Rails application designed for technical interviews. It provides a realistic blog platform where candidates can demonstrate their Rails skills in a time-constrained environment.
✅ Zero Setup Required - Ready to use with GitHub Codespaces ✅ Production-like Environment - PostgreSQL, Redis, Docker ✅ Pre-seeded Data - Users, posts, and comments for testing ✅ Authentication System - Devise integration ✅ Multiple Task Options - 10-15 minute coding challenges ✅ Realistic Codebase - Follows Rails conventions and best practices
- Open in Codespaces: Click the green "Code" button → "Open with Codespaces"
- Wait for Setup: Environment configures automatically (2-3 minutes)
- Start Development: Run
rails serverand start coding!
- Email: admin@example.com
- Password: password123
Additional test users: john@example.com, jane@example.com, bob@example.com, alice@example.com (all with password: password123)
- Rails 8.0+
- Ruby 3.3+
- PostgreSQL 16
- Redis 7
- Devise (Authentication)
- RSpec (Testing framework)
- Bootstrap-inspired CSS (No external dependencies)
app/
├── controllers/
│ └── posts_controller.rb # CRUD for blog posts
├── models/
│ ├── user.rb # Devise user with Devise
│ ├── post.rb # Blog post with search scope
│ └── comment.rb # Comments with approval system
└── views/
├── layouts/
│ └── application.html.erb # Navigation and flash messages
└── posts/ # Post CRUD views
- Devise authentication
has_many :posts, :comments- Full name method
- Belongs to user
has_many :comments- Published/draft system
- Search functionality
- Validation for title and content
- Belongs to user and post
- Approval system (approved/pending)
- Content validation
Post.published # Only published posts
Post.recent # Ordered by creation date
Post.search(term) # Search title and content
Post.by_user(user) # Posts by specific userComment.approved # Only approved comments
Comment.recent # Ordered by creation date# Setup (automatic in Codespaces)
bundle install
rails db:create db:migrate db:seed
# Start development server
rails server
# Run tests
rspec
# Rails console
rails console
# Check routes
rails routes# Start services
docker-compose up
# Run Rails commands
docker-compose exec app rails console
docker-compose exec app rails db:migrate- PostgreSQL database:
interview_development - Mailer: localhost:3000
- Cache: Memory store
- Assets: Live reloading
- PostgreSQL database:
interview_test - RSpec configuration
- Factory Bot for test data
The application comes with realistic seed data:
- 5 users (including admin)
- 6 blog posts (mix of published/draft)
- Multiple comments per post
- Approved and pending comments
- Choose appropriate task based on candidate level
- Allow 10-15 minutes for implementation
- Focus on Rails conventions and best practices
- Observe problem-solving approach
- Read task requirements carefully
- Ask clarifying questions
- Follow Rails conventions
- Test your implementation
- Explain your approach
- Codespace loading: Wait for full initialization
- Database connection: PostgreSQL may take time to start
- Asset issues: Run
rails assets:precompile - Gem conflicts: Run
bundle update
rails db:drop db:create db:migrate db:seedThis project is designed for interview purposes. To suggest improvements:
- Fork the repository
- Create a feature branch
- Submit a pull request with clear description
MIT License - See LICENSE file for details.