Skip to content

Commit 8ac3e76

Browse files
committed
init
0 parents  commit 8ac3e76

File tree

107 files changed

+21153
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+21153
-0
lines changed

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
42+
43+
certificates

LICENSE

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# eloop-turso - Serverless Event Management System
2+
3+
An event management system that integrates with Turso DBaaS storage, supporting hierarchical roles and dynamic form generation.
4+
5+
> **Note**: This project (eloop) is based on the concept and architecture of the original [eventloop](https://github.com/homebrew-ec-foss/eventloop) backend system, reimagined as a modern Next.js frontend with serverless-capabilities.
6+
7+
## Features
8+
9+
- **Role-Based Access Control**: Admin, Organizer, Volunteer, Participant, and Applicant roles with hierarchical permissions
10+
- **Dynamic Form Builder**: Drag-and-drop interface for creating custom registration forms
11+
- **QR Code Integration**: Secure QR codes for event check-ins with OAuth authentication
12+
- **Serverless Architecture**: Built with Next.js and Turso database for serverless operation
13+
- **Real-Time Analytics**: Track registrations and attendance for events
14+
15+
## Tech Stack
16+
17+
- **Frontend**: Next.js with TypeScript, Tailwind CSS
18+
- **Backend**: Next.js API Routes (serverless)
19+
- **Database**: Turso (SQLite-based serverless database)
20+
- **Authentication**: NextAuth.js with OAuth providers
21+
- **Form Building**: React DnD Kit for drag-and-drop interface
22+
- **QR Code**: QR code generation and scanning for event check-ins
23+
24+
## Getting Started
25+
26+
1. **Install dependencies:**
27+
```bash
28+
npm i
29+
```
30+
2. **Set up environment variables:**
31+
- Copy `.env.example` to `.env.local` and fill in your secrets (OAuth, Turso, etc).
32+
3. **Run the development server:**
33+
```bash
34+
npm run dev
35+
```
36+
4. **Open your browser:**
37+
Visit [http://localhost:3000](http://localhost:3000)
38+
39+
## Database Setup
40+
41+
The application automatically checks for the database tables on startup and initializes them if they don't exist. The user whose email matches the `ADMIN_EMAIL` environment variable will automatically be assigned the admin role when they first sign in. All other new users will be assigned the "applicant" role by default and must be approved by an admin to become participants.
42+
43+
## Project Structure
44+
45+
- `src/app/` — Next.js app directory (pages, API routes, layouts)
46+
- `src/components/` — Reusable UI components
47+
- `src/lib/` — Database, authentication, and utility logic
48+
- `src/types/` — TypeScript types
49+
50+
## Credits & History
51+
52+
### Original Concept
53+
This project is based on the [eventloop](https://github.com/homebrew-ec-foss/eventloop) backend system developed by [homebrew-ec-foss](https://github.com/homebrew-ec-foss). The original eventloop was a Go-based backend service designed for event management with QR code check-in capabilities.
54+
55+
### Project Evolution
56+
- **eventloop (Original)**: Go-based backend with SQLite database, QR code generation, and email notifications
57+
- **eloop-turso (my fork?)**: A Next.js reimplementation with serverless design, Tursodb integration, and enhanced UI/UX
58+
59+
### Key Features Inherited
60+
- Hierarchical role-based access control (Admin → Organizer → Volunteer → Participant)
61+
- QR code-based participant check-in system
62+
- Dynamic event registration with custom forms
63+
- Secure authentication and authorization
64+
- Fork+Deploy <2mins
65+
66+
### Acknowledgments
67+
- Thanks to the original eventloop contributors
68+
69+
## Contributing
70+
71+
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
72+
73+
## License
74+
75+
AGPL
76+
77+
## User Roles
78+
79+
1. **Admin**
80+
- Can set up organizer accounts
81+
- Has access to all organizer, volunteer, and participant capabilities
82+
- One-time setup triggered via a QR code secret
83+
84+
2. **Organizer**
85+
- Can configure registration forms through a drag-and-drop interface
86+
- Can view event analytics
87+
- Can assign volunteers
88+
- Has access to volunteer and participant capabilities
89+
90+
3. **Volunteer**
91+
- Uses a QR scanner to check in participants at events
92+
- Cannot configure forms or view analytics
93+
94+
4. **Participant**
95+
- Registers for events through OAuth
96+
- Receives a QR code for check-in
97+
- Can be scanned by volunteers at the event
98+
99+
5. **Applicant**
100+
- Default role for new users upon registration
101+
- Limited access until approved by an admin
102+
- Must be approved to become a participant and access event registration

eslint.config.mjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [
13+
...compat.extends("next/core-web-vitals", "next/typescript"),
14+
{
15+
ignores: [
16+
"node_modules/**",
17+
".next/**",
18+
"out/**",
19+
"build/**",
20+
"next-env.d.ts",
21+
],
22+
},
23+
];
24+
25+
export default eslintConfig;

next.config.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
6+
// Configure webpack to ignore LICENSE files
7+
webpack: (config) => {
8+
config.module = config.module || {};
9+
config.module.rules = config.module.rules || [];
10+
config.module.rules.push({
11+
test: /LICENSE$/,
12+
use: 'ignore-loader',
13+
});
14+
15+
return config;
16+
},
17+
18+
// Disable ESLint for production build
19+
eslint: {
20+
// Only run ESLint in development
21+
ignoreDuringBuilds: true,
22+
}
23+
};
24+
25+
export default nextConfig;

0 commit comments

Comments
 (0)