|
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 | +## LibrarEase Web |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +A Next.js app for LibrarEase. This repo uses Yarn. |
4 | 4 |
|
5 | | -First, run the development server: |
| 5 | +**Prereqs** |
| 6 | + |
| 7 | +- Node.js 18+ (or 20+ recommended) |
| 8 | +- Yarn (classic) — packageManager is set in `package.json` |
| 9 | +- Redis (local or hosted) |
| 10 | +- Firebase project (client SDK + Admin credentials) |
| 11 | + |
| 12 | +## Quick Setup |
| 13 | + |
| 14 | +1. Install deps |
6 | 15 |
|
7 | 16 | ```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
14 | | -bun dev |
| 17 | +yarn install |
| 18 | +``` |
| 19 | + |
| 20 | +2. Configure environment |
| 21 | + |
| 22 | +Copy the example and fill required values: |
| 23 | + |
| 24 | +```bash |
| 25 | +cp .env.example .env |
| 26 | +# or create .env.local in development |
| 27 | +``` |
| 28 | + |
| 29 | +Required variables (see `.env.example` for the full list): |
| 30 | + |
| 31 | +- Firebase client: `FIREBASE_API_KEY`, `FIREBASE_AUTH_DOMAIN`, `FIREBASE_PROJECT_ID` |
| 32 | +- Firebase Admin: `GOOGLE_APPLICATION_CREDENTIALS` (absolute path to the service account JSON) |
| 33 | +- Redis: `REDIS_HOST`, `REDIS_PORT`, `REDIS_PASSWORD` (optional), `REDIS_DB` |
| 34 | +- App URLs: `API_URL`, `NEXT_PUBLIC_APP_URL` |
| 35 | + |
| 36 | +3. Start Redis |
| 37 | + |
| 38 | +On macOS (Homebrew): |
| 39 | + |
| 40 | +```bash |
| 41 | +brew install redis |
| 42 | +brew services start redis |
| 43 | +# default host: localhost, port: 6379 |
| 44 | +``` |
| 45 | + |
| 46 | +Or via Docker: |
| 47 | + |
| 48 | +```bash |
| 49 | +docker run -p 6379:6379 --name redis -d redis:7 |
15 | 50 | ``` |
16 | 51 |
|
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 52 | +4. Run the app |
| 53 | + |
| 54 | +```bash |
| 55 | +yarn dev |
| 56 | +# build & run production |
| 57 | +yarn build && yarn start |
| 58 | +``` |
18 | 59 |
|
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 60 | +Open http://localhost:3000 to view. |
20 | 61 |
|
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. |
| 62 | +## Scripts |
22 | 63 |
|
23 | | -## Learn More |
| 64 | +- `yarn dev`: Next.js dev server (Turbopack) |
| 65 | +- `yarn build`: Production build |
| 66 | +- `yarn start`: Start production server |
| 67 | +- `yarn lint`: ESLint |
| 68 | +- `yarn format`: Prettier format |
| 69 | +- `yarn typecheck`: TypeScript type checking |
24 | 70 |
|
25 | | -To learn more about Next.js, take a look at the following resources: |
| 71 | +## Firebase Notes |
26 | 72 |
|
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. |
| 73 | +- Create a Firebase project and enable Authentication as needed |
| 74 | +- Place the Admin service account JSON and point `GOOGLE_APPLICATION_CREDENTIALS` to it |
| 75 | +- Client keys go in `FIREBASE_*` variables; do not commit secrets |
29 | 76 |
|
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 77 | +## Observability (optional) |
31 | 78 |
|
32 | | -## Deploy on Vercel |
| 79 | +If using OpenTelemetry, configure `OTEL_*` variables per `.env.example`. |
33 | 80 |
|
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. |
| 81 | +## License |
35 | 82 |
|
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 83 | +This software is licensed under the PolyForm Noncommercial License 1.0.0. See the `LICENSE` file for terms. For commercial licensing inquiries, contact: solidifyarmor@gmail.com. |
0 commit comments