Notemy is a modern note-taking application built with Next.js, featuring secure authentication and a responsive design.
Before you begin, ensure you have the following installed:
- Node.js: version 20 or higher.
- Git: version 2.x or higher.
- Docker (optional): for containerized deployment.
Copy the example environment file to create your local configuration:
cp example.env .envOpen .env and configure the following variables:
BETTER_AUTH_SECRET: Secret key for authentication (generate usingnpx auth secret).BETTER_AUTH_URL: Base URL of your app (e.g.,http://localhost:3000).GITHUB_CLIENT_ID: GitHub OAuth Client ID.GITHUB_CLIENT_SECRET: GitHub OAuth Client Secret.DATABASE_URL: Connection string for your PostgreSQL database.NEXT_PUBLIC_SECURE_LOCAL_STORAGE_HASH_KEY: Secret key for secure local storage.NEXT_PUBLIC_SECURE_LOCAL_STORAGE_PREFIX: Prefix for local storage keys (e.g.,notemy_).
-
Clone the repository:
git clone <repository-url> cd notemy
-
Install dependencies:
npm install # or yarn install # or pnpm install
To start the development server:
npm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 with your browser to see the result.
To build the application for production:
npm run build
# or
yarn build
# or
pnpm buildTo start the production server:
npm run start
# or
yarn start
# or
pnpm startThis project includes a Dockerfile optimized for production using output: "standalone" in Next.js.
Run the following command in the root directory:
docker build -t notemy .Start the container, mapping port 3000 and passing your environment variables:
docker run -d -p 3000:3000 --env-file .env --name notemy-container notemyYour application should now be running at http://localhost:3000.