Postly is a community platform focused on personal growth and reflection sharing, allowing users to record and share their daily reflections and insights.
Postly 是一個專注於個人成長和反思分享的社群平台,讓使用者能夠記錄並分享他們的日常反思和見解。
- Get daily curated reflection topics
- Guide users through deep thinking
- Optional prompts that can be toggled
- 獲取每日精選的反思主題
- 引導使用者進行深度思考
- 可選擇性開啟/關閉提示
- Users can share personal reflections
- Interactive features (likes, comments)
- Clean card-based design
- 使用者可以分享個人反思
- 互動功能(按讚、評論)
- 清晰的卡片式設計
- Streak tracking for continuous reflection
- Personal trait tags and growth metrics
- Interaction statistics and engagement analytics
- 連續反思的紀錄追蹤
- 個人特質標籤和成長指標
- 互動統計和參與度分析
- View community members' shares
- Content sharing functionality
- Daily featured content recommendations
- Real-time engagement notifications
- 瀏覽社群成員的分享
- 內容分享功能
- 每日精選內容推薦
- 即時互動通知
- Next.js 15.3.3 (App Router)
- React 19
- TypeScript 5
- Tailwind CSS 4
- NextAuth.js for authentication
- TanStack Query for data fetching
- Headless UI for accessible components
{
"dependencies": {
"next": "15.3.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"@headlessui/react": "^2.2.4",
"@heroicons/react": "^2.2.0",
"@tanstack/react-query": "^5.80.6",
"next-auth": "^4.24.11",
"date-fns": "^4.1.0",
"clsx": "^2.1.1",
"tailwind-merge": "^3.3.0"
}
}postly/
├── src/
│ ├── app/ # Next.js 13+ App Router
│ │ ├── api/ # API Routes
│ │ ├── auth/ # Authentication pages
│ │ ├── post/ # Post related pages
│ │ ├── profile/ # User profile pages
│ │ ├── streak/ # Streak tracking pages
│ │ └── user/ # User related pages
│ ├── components/ # React Components
│ │ ├── Comments/ # Comment related components
│ │ ├── AuthProvider.tsx # Authentication provider
│ │ ├── Header.tsx # Main header component
│ │ └── ReflectionCard.tsx # Reflection display component
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility libraries
│ ├── services/ # API services
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── public/ # Static assets
│ └── logo.png # Project logo
├── .env.example # Environment variables example
├── tailwind.config.ts # Tailwind CSS configuration
├── next.config.ts # Next.js configuration
└── package.json # Project dependencies
- Node.js 18.0.0 or higher
- npm 9.0.0 or higher
- Git
-
Copy
.env.exampleto.env.local:cp .env.example .env.local
-
Update the environment variables in
.env.local:# Application NEXT_PUBLIC_API_URL=http://localhost:3000 # Authentication GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your_nextauth_secret
-
Clone the repository 複製專案
git clone https://github.com/your-username/postly.git cd postly -
Install dependencies 安裝依賴
npm install
-
Start development server 啟動開發伺服器
npm run dev
-
Open browser and visit 開啟瀏覽器並訪問
http://localhost:3000
- Follow TypeScript strict mode
- Use ESLint for code linting
- Follow Prettier code formatting
- Use Tailwind CSS for styling
- 遵循 TypeScript 嚴格模式
- 使用 ESLint 進行程式碼檢查
- 遵循 Prettier 程式碼格式化
- 使用 Tailwind CSS 進行樣式設計
- Create reusable components in
src/components - Use TypeScript interfaces for props
- Implement proper error handling
- Add JSDoc comments for documentation
- 在
src/components建立可重用元件 - 使用 TypeScript 介面定義 props
- 實作適當的錯誤處理
- 添加 JSDoc 註解作為文件
- Use React Query for server state
- Implement React Context where needed
- Follow React hooks best practices
- 使用 React Query 管理伺服器狀態
- 根據需求實作 React Context
- 遵循 React hooks 最佳實踐
- Google OAuth2.0 integration
- JWT token based authentication
- Protected API routes
- Google OAuth2.0 整合
- 基於 JWT token 的認證
- 受保護的 API 路由
/api/auth/*- Authentication routes/api/posts/*- Post management/api/comments/*- Comment management/api/users/*- User management/api/streak/*- Streak tracking
- Unit tests with Jest
- Integration tests with React Testing Library
- E2E tests with Cypress
- 使用 Jest 進行單元測試
- 使用 React Testing Library 進行整合測試
- 使用 Cypress 進行端對端測試
npm run build
npm start- Vercel (Recommended)
- Docker
- Self-hosted
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT License - see the LICENSE file for details
- Next.js team for the amazing framework
- Tailwind CSS team for the utility-first CSS framework
- All contributors who have helped this project grow
Built with ❤️ by Sun
