A minimalist real-time card application built with Next.js, Socket.IO, and TypeScript. Create and share cards with real-time updates across all connected users.
- Real-time Updates: Cards appear instantly across all connected users using Socket.IO
- Minimalist Design: Clean Apple-style UI with a monochromatic theme (#F3F3F1 and #000)
- TypeScript: Full type safety throughout the application
- Responsive: Works beautifully on desktop and mobile devices
- In-memory Storage: No database required - cards are stored in memory
- Form Validation: Client-side validation for creating new cards
- Frontend: Next.js 14, React 18, TypeScript
- Real-time: Socket.IO
- Styling: CSS with Apple-inspired design principles
- Development: ESLint, TypeScript strict mode
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd asking-card- Install dependencies:
npm install- Start the Socket.IO server:
npm run server- In a new terminal, start the Next.js development server:
npm run dev- Open http://localhost:3000 in your browser
- View Cards: All existing cards are displayed on the main page
- Create Cards: Fill out the form with a topic and description, then click "Create Card"
- Real-time Updates: Open multiple browser tabs to see real-time updates
- Delete Cards: Click the × button on any card to delete it
- Responsive Design: Use on any device - the design adapts automatically
asking-card/
├── app/ # Next.js app directory
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # React components
│ ├── Card.tsx # Individual card component
│ └── CardForm.tsx # Form for creating cards
├── hooks/ # Custom React hooks
│ └── useSocket.ts # Socket.IO client hook
├── types/ # TypeScript type definitions
│ └── index.ts # Card and form interfaces
├── server.js # Socket.IO server
├── package.json # Dependencies and scripts
└── README.md # This file
npm run dev- Start Next.js development servernpm run build- Build the application for productionnpm start- Start the production servernpm run server- Start the Socket.IO servernpm run lint- Run ESLint
The application follows Apple's design principles:
- Minimalism: Clean, uncluttered interface focusing on content
- Typography: System fonts with carefully chosen weights and sizes
- Color Palette: Monochromatic theme with #F3F3F1 (light gray) and #000 (black)
- Spacing: Generous whitespace and consistent padding/margins
- Interactions: Subtle hover effects and smooth transitions
- Accessibility: High contrast ratios and semantic HTML
- The Socket.IO server runs on port 3001 by default
- Cards are stored in memory and will be lost when the server restarts
- The application uses Next.js 13+ App Router structure
- All components are fully typed with TypeScript
- The design is mobile-first and fully responsive
- Fork the repository
- Create your 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 is licensed under the MIT License - see the LICENSE file for details.