This project includes configurations and code for setting up and running ORY Hydra, ORY Kratos, and a Next.js application with ORY UI.
docker-compose.yml
: Docker Compose file for setting up the services.hydra/
: Contains configuration for ORY Hydra.hydra.yml
: Configuration file for ORY Hydra.
kratos/
: Contains configuration and identity schema for ORY Kratos.kratos.yml
: Configuration file for ORY Kratos.identity.schema.json
: Defines the identity schema for ORY Kratos.
ory-ui-nextjs/
: Contains the Next.js application with ORY UI..next
: Next.js build directory.node_modules
: Project dependencies.public
: Static files for the Next.js app.src
: Source code for the Next.js app.Dockerfile
: Dockerfile for building the Next.js app.next-env.d.ts
: TypeScript environment definitions.next.config.mjs
: Next.js configuration file.package.json
: Project metadata and dependencies.package-lock.json
: Exact versions of dependencies.postcss.config.js
: PostCSS configuration.tailwind.config.ts
: Tailwind CSS configuration.tsconfig.json
: TypeScript configuration file.
- Docker
- Node.js
-
Clone the repository:
git clone https://github.com/your-repo/ory-identity.git cd ory-identity
-
Start the services:
docker-compose up -d
-
Install dependencies for the Next.js application:
cd ory-ui-nextjs npm install
-
Start the Next.js application:
npm run dev
-
Access the Next.js UI: Open your browser and navigate to http://127.0.0.1:3000.
-
Access Kratos and Hydra:
- Kratos Public: http://127.0.0.1:4433
- Kratos Admin: http://kratos:4434
- Hydra Public: http://127.0.0.1:4444
- Hydra Admin: http://hydra:4445
- MailSlurper: http://127.0.0.1:4436
-
Redirect URI Example:
http://127.0.0.1:4444/oauth2/auth?response_type=code&client_id=758a580d-54e4-4ca3-8b25-3c6b478e9e66&redirect_uri=https://codedash.in&state=1234571625371253716&prompt=registration
This file contains the configuration for Ory Kratos, including self-service flows, SMTP settings, and identity schema.
Defines the schema for user identities, including required traits like email and name.
This file contains the configuration for Ory Hydra, including URLs for consent, login, registration, and logout.
The Docker Compose file defines and manages the multi-container Docker application. It includes services for Kratos, Hydra, MailSlurper, and the Next.js frontend.
This Dockerfile defines the build steps for the Next.js application.
To start and stop the services during development, use the following commands:
- Start Services:
docker-compose up
- Stop Services:
docker-compose down
To rebuild the services after making changes, run:
docker-compose up --build
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
This project is licensed under the MIT License.