git clone <repository-url>
cd odc_dir_opnpm installCopy the example environment file:
cp .env.example .envEdit .env and configure the following:
- DATABASE_URL: Your PostgreSQL connection string
- SESSION_SECRET: Generate with
openssl rand -hex 64(minimum 128 characters) - GITHUB_CLIENT_ID: Your GitHub OAuth app client ID (optional)
- GITHUB_CLIENT_SECRET: Your GitHub OAuth app client secret (optional)
- GITHUB_CALLBACK_URL: OAuth callback URL (default:
http://localhost:5000/api/auth/callback) - CORS_ORIGIN: Your frontend URL (default:
http://localhost:5000) - NODE_ENV: Set to
developmentorproduction
Push the database schema:
npm run db:pushnpm run devThe application will be available at http://localhost:5000
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run check- Type check with TypeScriptnpm run db:push- Push database schema changesnpm run assets:generate- Generate logo variants
.
├── client/ # Frontend React application
│ ├── src/ # Source files
│ └── public/ # Static assets
├── server/ # Backend Express application
│ ├── routes.ts # API routes
│ ├── storage.ts # Database operations
│ ├── githubAuth.ts # GitHub OAuth configuration
│ ├── middleware/ # Express middleware
│ └── utils/ # Utility functions
├── shared/ # Shared types and utilities
└── scripts/ # Build and utility scripts
The application supports two authentication methods:
- Local Authentication: Email/password based registration and login for admins
- GitHub OAuth: Sign in with GitHub account
This project uses Drizzle ORM with PostgreSQL. The database configuration is in drizzle.config.ts.
To modify the schema:
- Edit the schema files
- Run
npm run db:pushto sync changes
Build the application for production:
npm run buildStart the production server:
npm start- Session secrets must be at least 128 characters in production
- Never commit
.envfile to version control - Set
CORS_ORIGINto your actual domain in production (never use*) - Use HTTPS in production
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
If you encounter any issues or have suggestions, please open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.