|
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 | +# FHIR Place UI |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +A Next.js application for managing FHIR data with authentication and SQLite database. |
4 | 4 |
|
5 | | -First, run the development server: |
| 5 | +## Features |
6 | 6 |
|
7 | | -```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
14 | | -bun dev |
15 | | -``` |
| 7 | +- User authentication with NextAuth.js |
| 8 | +- SQLite database for data persistence |
| 9 | +- Modern UI with Tailwind CSS |
| 10 | +- Docker support for containerized deployment |
16 | 11 |
|
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 12 | +## Development |
18 | 13 |
|
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 14 | +### Prerequisites |
20 | 15 |
|
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. |
| 16 | +- Node.js 18+ |
| 17 | +- npm or yarn |
22 | 18 |
|
23 | | -## Learn More |
| 19 | +### Local Development |
24 | 20 |
|
25 | | -To learn more about Next.js, take a look at the following resources: |
| 21 | +1. Install dependencies: |
26 | 22 |
|
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. |
| 23 | + ```bash |
| 24 | + npm install |
| 25 | + ``` |
29 | 26 |
|
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 27 | +2. Initialize the database: |
31 | 28 |
|
32 | | -## Deploy on Vercel |
| 29 | + ```bash |
| 30 | + npm run db:init |
| 31 | + ``` |
33 | 32 |
|
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. |
| 33 | +3. Start the development server: |
35 | 34 |
|
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 35 | + ```bash |
| 36 | + npm run dev |
| 37 | + ``` |
| 38 | + |
| 39 | +4. Open [http://localhost:3000](http://localhost:3000) in your browser. |
| 40 | + |
| 41 | +## Docker Deployment |
| 42 | + |
| 43 | +The application is configured to run in Docker containers with the main `compose.yaml` file. |
| 44 | + |
| 45 | +### Environment Variables |
| 46 | + |
| 47 | +The following environment variables are required: |
| 48 | + |
| 49 | +- `NEXTAUTH_SECRET`: Secret key for NextAuth.js (change in production) |
| 50 | +- `AUTH_TRUST_HOST`: Set to `true` for Docker deployment |
| 51 | +- `NODE_ENV`: Set to `production` for Docker |
| 52 | +- `PORT`: Application port (default: 3000) |
| 53 | + |
| 54 | +### Running with Docker Compose |
| 55 | + |
| 56 | +1. From the project root, run: |
| 57 | + |
| 58 | + ```bash |
| 59 | + docker-compose --profile dev up fhir-ui |
| 60 | + ``` |
| 61 | + |
| 62 | +2. The UI will be available at [http://localhost:3000](http://localhost:3000) |
| 63 | + |
| 64 | +### Database |
| 65 | + |
| 66 | +The SQLite database is stored in the `/app/data` directory and persisted using Docker volumes. The database will be automatically initialized on first run. |
| 67 | + |
| 68 | +## Available Scripts |
| 69 | + |
| 70 | +- `npm run dev`: Start development server |
| 71 | +- `npm run build`: Build for production |
| 72 | +- `npm run start`: Start production server |
| 73 | +- `npm run db:init`: Initialize database with seed data |
| 74 | +- `npm run db:generate`: Generate database schema |
| 75 | +- `npm run db:migrate`: Run database migrations |
0 commit comments