This is the frontend for Jede - a modular Learning Management System (LMS) designed to facilitate bitcoin technical education through structured challenges and exercises.
We use GitHub Oauth as the primary authentication method. So you will need to create a Github Oauth App.
First, copy the .env.sample into a .env file
cp .env.sample .envNext, copy the GitHub client ID and the secret and replace the values of the environment variables in the env.sample file.
You can optionally generate a random secret and replace the value of the NEXTAUTH_SECRET in the env file.
openssl rand -hex 32Next, install the dependencies npm install and run the code.
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
This project uses Storybook for developing and showcasing UI components in isolation. To use Storybook:
- Make sure you've installed all dependencies:
npm install- Run Storybook:
npm run storybook- Open http://localhost:6006 in your browser to view the Storybook interface.
To create a new story for a component:
- Create a new file in the same directory as your component with the naming convention
[ComponentName].stories.tsx. - Use the following template, replacing
[ComponentName]with your actual component name:
import type { Meta, StoryObj } from '@storybook/react';
import [ComponentName] from './[ComponentName]';
const meta: Meta<typeof [ComponentName]> = {
title: 'Components/[ComponentName]',
component: [ComponentName],
tags: ['autodocs'],
};
export default meta;
type Story = StoryObj<typeof [ComponentName]>;
export const Default: Story = {
args: {},
};-
Customize the
argsobject in theDefaultstory to pass props to your component as needed. -
Run Storybook to see your new story in action.
Using Storybook allows for rapid UI development and testing, independent of the backend implementation.
This project includes Docker support for easy deployment on any VPS (Virtual Private Server) or cloud platform.
- Build the Docker image:
docker build -f Dockerfile -t hxckr-web .- Run the container:
docker run -p 3000:3000 hxckr-webThe app will be available at http://your-server-ip:3000.
When deploying with Docker, make sure to set up your environment variables. You can do this by:
- Creating a
.envfile as described in the Getting Started section - Passing environment variables when running the container:
docker run -p 3000:3000 \
-e GITHUB_ID=your_github_id \
-e GITHUB_SECRET=your_github_secret \
-e NEXTAUTH_SECRET=your_nextauth_secret \
-e NEXTAUTH_URL=http://your-domain.com \
-e NEXT_PUBLIC_APP_CORE_BASE_URL=http://your-core-api-url \
-e NEXT_PUBLIC_APP_WEBSOCKET_URL=ws://your-websocket-url \
hxckr-webThis Docker setup enables easy deployment on any VPS, providing a consistent environment across different hosting platforms.