|
1 | | -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
| 1 | +# Write Document - Collaborative Document Editor |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +A real-time collaborative document editor built with modern web technologies, offering a seamless writing and collaboration experience. |
4 | 4 |
|
5 | | -First, run the development server: |
| 5 | +## Tech Stack |
6 | 6 |
|
7 | | -```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
14 | | -bun dev |
| 7 | +### Frontend |
| 8 | +- **Next.js** - React framework for production-grade applications |
| 9 | +- **TypeScript** - For type-safe code |
| 10 | +- **Radix UI** - Headless UI components for building accessible interfaces |
| 11 | +- **TipTap** - Rich text editor framework |
| 12 | +- **Clerk** - Authentication and user management |
| 13 | +- **Liveblocks** - Real-time collaboration features |
| 14 | +- **Convex** - Backend and real-time data synchronization |
| 15 | + |
| 16 | +### UI/UX |
| 17 | +- **Tailwind CSS** - Utility-first CSS framework |
| 18 | +- **Radix UI Components** - Including: |
| 19 | + - Accordion |
| 20 | + - Alert Dialog |
| 21 | + - Avatar |
| 22 | + - Carousel |
| 23 | + - Dialog |
| 24 | + - Dropdown Menu |
| 25 | + - And more... |
| 26 | + |
| 27 | +## Workflow |
| 28 | + |
| 29 | +### Development |
| 30 | +1. Local Development |
| 31 | + ```bash |
| 32 | + npm run dev |
| 33 | + |
| 34 | + npm run build |
| 35 | + npm run start |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +## GitHub Workflow |
| 40 | + |
| 41 | +The repository uses GitHub Actions for automated builds with two main workflow files: |
| 42 | + |
| 43 | +### Main Build Workflow (`build.yml`) |
| 44 | +Located in `.github/workflows/build.yml`, this workflow triggers when pull requests are closed on the main branch. |
| 45 | + |
| 46 | +```yaml |
| 47 | +name: Build Application |
| 48 | +on: |
| 49 | + pull_request: |
| 50 | + types: [closed] |
| 51 | + branches: [main] |
15 | 52 | ``` |
16 | 53 |
|
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 54 | +The workflow uses the following secret environment variables for secure deployment: |
| 55 | + |
| 56 | + NEXT_PUBLIC_CONVEX_URL |
| 57 | + CONVEX_DEPLOYMENT |
| 58 | + CLERK_SECRET_KEY |
| 59 | + NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
| 60 | + LIVE_BLOCK_SECRET_API_KEY |
| 61 | + |
| 62 | + |
| 63 | +Reusable Build Steps ( build-reusable.yml) |
| 64 | +Located in .github/workflows/build-reusable.yml, this contains the core build logic: |
| 65 | + |
| 66 | +Environment Setup : |
| 67 | + |
| 68 | +Runs on Ubuntu latest |
| 69 | + |
| 70 | +Uses Node.js version 20 |
| 71 | + |
| 72 | +Sets up pnpm package manager (version 8) |
| 73 | + |
| 74 | +Build Process : |
| 75 | + |
| 76 | +Checks out the code |
| 77 | + |
| 78 | +Configures Node.js environment |
18 | 79 |
|
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 80 | +Installs dependencies using pnpm |
20 | 81 |
|
21 | | -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
| 82 | +Environment Variables : All sensitive information is handled through GitHub Secrets and passed as environment variables during the build process. |
22 | 83 |
|
23 | | -## Learn More |
| 84 | +Usage |
| 85 | +The workflow automatically triggers when: |
24 | 86 |
|
25 | | -To learn more about Next.js, take a look at the following resources: |
| 87 | +A pull request is closed on the main branch |
26 | 88 |
|
27 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 89 | +The build process is reusable and can be called from other workflows |
29 | 90 |
|
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 91 | +To manually trigger the workflow, you can: |
31 | 92 |
|
32 | | -## Deploy on Vercel |
| 93 | +# Push changes to trigger the workflow |
| 94 | +git push origin main |
33 | 95 |
|
34 | | -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 96 | +# Or create and merge a pull request to main branch |
35 | 97 |
|
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 98 | +This explanation provides a clear overview of your GitHub Actions workflow setup, including the trigger conditions, environment configuration, and build process. You can add this to your README.md to help other developers understand your CI/CD pipeline. |
0 commit comments