|
| 1 | +# Devfolio Documentation |
| 2 | + |
| 3 | +This is a modern documentation site built with [Fumadocs](https://fumadocs.vercel.app) and Next.js, featuring analytics, user feedback, and more. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- 📊 **Analytics Integration** - Tracks page views, time on page, and user interactions |
| 8 | +- 👍 **Helpful Rating System** - Users can rate documentation pages |
| 9 | +- 🤖 **Chatbot Integration** - AI-powered assistance (coming soon) |
| 10 | +- 📱 **Mobile Responsive** - Works on all devices |
| 11 | +- 🚀 **CI/CD Pipeline** - Automated testing and deployment |
| 12 | + |
| 13 | +## Getting Started |
| 14 | + |
| 15 | +### Prerequisites |
| 16 | + |
| 17 | +- Node.js 18+ and npm/yarn/pnpm |
| 18 | +- A PostHog account for analytics |
| 19 | + |
| 20 | +### Installation |
| 21 | + |
| 22 | +1. Clone the repository |
| 23 | + ```bash |
| 24 | + git clone https://github.com/your-username/devfolio-docs.git |
| 25 | + cd devfolio-docs |
| 26 | + ``` |
| 27 | + |
| 28 | +2. Install dependencies |
| 29 | + ```bash |
| 30 | + npm install |
| 31 | + # or |
| 32 | + yarn install |
| 33 | + # or |
| 34 | + pnpm install |
| 35 | + ``` |
| 36 | + |
| 37 | +3. Set up environment variables |
| 38 | + ```bash |
| 39 | + cp .env.local.example .env.local |
| 40 | + ``` |
| 41 | + Update `.env.local` with your PostHog credentials: |
| 42 | + ```env |
| 43 | + NEXT_PUBLIC_POSTHOG_KEY=your_posthog_project_key |
| 44 | + NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com # or your self-hosted instance |
| 45 | + ``` |
| 46 | + |
| 47 | +4. Run the development server |
| 48 | + ```bash |
| 49 | + npm run dev |
| 50 | + # or |
| 51 | + yarn dev |
| 52 | + # or |
| 53 | + pnpm dev |
| 54 | + ``` |
| 55 | + |
| 56 | + Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 57 | + |
| 58 | +## Development |
| 59 | + |
| 60 | +### Available Scripts |
| 61 | + |
| 62 | +- `npm run dev` - Start development server |
| 63 | +- `npm run build` - Build for production |
| 64 | +- `npm start` - Start production server |
| 65 | +- `npm test` - Run tests |
| 66 | +- `npm run lint` - Run ESLint |
| 67 | +- `npm run type-check` - Check TypeScript types |
| 68 | + |
| 69 | +## Deployment |
| 70 | + |
| 71 | +### Vercel |
| 72 | + |
| 73 | +[](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fyour-username%2Fdevfolio-docs&project-name=devfolio-docs&repository-name=devfolio-docs) |
| 74 | + |
| 75 | +### Manual Deployment |
| 76 | + |
| 77 | +1. Build the application: |
| 78 | + ```bash |
| 79 | + npm run build |
| 80 | + ``` |
| 81 | + |
| 82 | +2. Start the production server: |
| 83 | + ```bash |
| 84 | + npm start |
| 85 | + ``` |
| 86 | + |
| 87 | +## Analytics |
| 88 | + |
| 89 | +This project uses [PostHog](https://posthog.com) for analytics. The following events are tracked: |
| 90 | + |
| 91 | +- Page views |
| 92 | +- Time spent on page |
| 93 | +- Document helpfulness ratings |
| 94 | +- Search queries (coming soon) |
| 95 | +- Chatbot interactions (coming soon) |
| 96 | + |
| 97 | +## Contributing |
| 98 | + |
| 99 | +1. Fork the repository |
| 100 | +2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
| 101 | +3. Commit your changes (`git commit -m 'Add some amazing feature'`) |
| 102 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 103 | +5. Open a Pull Request |
| 104 | + |
| 105 | +## License |
| 106 | + |
| 107 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 108 | + |
| 109 | +## Acknowledgements |
| 110 | + |
| 111 | +- [Fumadocs](https://fumadocs.vercel.app) - Documentation framework |
| 112 | +- [Next.js](https://nextjs.org) - React framework |
| 113 | +- [PostHog](https://posthog.com) - Product analytics |
| 114 | +- [Tailwind CSS](https://tailwindcss.com) - Utility-first CSS framework |
0 commit comments