Spark is an open-source platform designed to connect students, community members, and industry professionals to collaborate on innovative solutions, gain valuable learning experiences, and contribute to open-source projects. By fostering a culture of shared knowledge and contribution, Spark aims to bridge gaps in education, industry requirements, and technological advancement in Pakistan and beyond.
To empower learners and professionals to engage in impactful collaborations, create practical solutions, and foster a thriving open-source ecosystem.
-
Profile & Engagement
- Comprehensive profiles with skill tags, experience, and achievements.
- Recognition through badges, rewards, and endorsements.
-
Internships, Freelance, & Bounty Programs
- Listings for freelance opportunities, bounties, and internships with tracking and rewards.
-
Job Portal
- Skill-based job listings with industry collaboration.
-
Resources & Courses
- Access to free, point-based, or paid learning materials.
-
Session & Event Planning
- Seamless event scheduling, notifications, and rewards for participation.
-
Project Idea Bank
- A repository of problem statements and solutions for students, professionals, and communities.
-
Channels & Spaces
- Collaborate in dedicated spaces with real-time chat, file sharing, feeds and posts, and project management tools.
-
Rewards System
- Points and badges for engagement, contributions, and accomplishments.
-
Automation
- Notifications and reward management for improved user experience.
- Framework: Next.js
- π User authentication with Clerk
- π§ Database using [Postgres] (SQL) and Drizzle ORM
- π Modern styling with Tailwind CSS and shadcn/ui
- πͺ³ Object storage using S3-compatible services (e.g., MinIO) and AZURE Blob storage
- π Real-time interactions using Ably and pusher
- π Developer-friendly with seeding, migration, and structured environment management
We welcome contributors from all skill levels! Here's how you can get started:
Show your support by starring this repository!
Click the "Fork" button to create your own copy.
git clone https://github.com/ETLOnline/spark.git
cd spark
npm install
- Copy the
.env.example
file to.env
- Replace placeholder values with your own credentials
DB_SSL=true
DB_HOST=host
DB_PORT=port-normally-5432
DB_USER=user
DB_PWD="password"
DB_NAME=spark
WEBHOOK_SECRET=your-webhook-secret
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your-clerk-publishable-key
CLERK_SECRET_KEY=your-clerk-secret-key
ABLY_API_KEY=your-ably-api-key
S3_BUCKET_NAME=your-bucket
S3_REGION=your-region
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key
S3_ENDPOINT=your-s3-endpoint
PUSHER_APP_ID=app-id
NEXT_PUBLIC_PUSHER_KEY=key
PUSHER_SECRET=secret
NEXT_PUBLIC_PUSHER_CLUSTER=cluster
Before you begin, make sure you have the appropriate package manager for your operating system:
- macOS: Homebrew
- Windows: An internet browser to download the installer.
- Linux:
apt
or another package manager.
Follow the instructions for your specific operating system.
-
Update Homebrew:
brew update
-
Install PostgreSQL:
brew install postgresql
-
Start the PostgreSQL service:
brew services start postgresql
This will start the database server and ensure it launches automatically on login.
-
Download the Installer: Go to the official PostgreSQL download page and download the installer for your version of Windows.
-
Run the Installer:
- Run the downloaded executable.
- Follow the setup wizard. You can leave most settings as default.
- Important: During installation, you will be prompted to set a password for the default superuser,
postgres
. Remember this password, as you will need it to create other users and databases. - The installer will also install
pgAdmin
, a popular GUI tool for managing PostgreSQL.
-
Update your package list:
sudo apt update
-
Install PostgreSQL and its contribution package:
sudo apt install postgresql postgresql-contrib
-
The service should start automatically. You can verify its status with:
sudo systemctl status postgresql
After installation, you'll need to access the PostgreSQL command-line prompt, psql
.
- On macOS and Linux, PostgreSQL creates a user named
postgres
. You need to switch to this user to perform administrative tasks.sudo -u postgres psql
- On Windows, you can open the "SQL Shell (psql)" application from the Start Menu. It will prompt you for the server, database, port, username, and password. You can accept the defaults and enter the password you set during installation.
It's best practice to create a specific user and database for each project. Run these commands from within the psql
shell.
-
Create a new user (role) with a password. Replace
myuser
andmypassword
with your desired credentials.CREATE ROLE myuser WITH LOGIN PASSWORD 'mypassword';
-
Create a new database. It's common to name the database after your project. Replace
mydatabase
with your desired name.CREATE DATABASE mydatabase;
-
Grant all privileges on the new database to your new user. This allows your application's user to read, write, and modify the database.
GRANT ALL PRIVILEGES ON DATABASE mydatabase TO myuser;
-
Exit the
psql
shell:\q
You can now connect directly to your newly created database using the user you created.
-
From your terminal (macOS/Linux):
psql -U myuser -d mydatabase -h localhost
It will prompt you for the password (
mypassword
). -
From the SQL Shell (Windows): Relaunch the shell and enter the new database name and username when prompted.
Most applications connect to a database using a connection string or URL. Based on the user and database created above, your connection string would look like this:
postgresql://myuser:mypassword@localhost:5432/mydatabase
^^^^^^^^^^ ^^^^^^ ^^^^^^^^^ ^^^^^^^ ^^^ ^^^^^^^^
user password host port DB_NAME
You would need to place this in your project's configuration file ( .env
).
npm run db:migrate
npm run db:seed
npm run dev
Note: Creating a new user will not work on localhost since webhooks are configured for the deployed URL.
Check the Issues tab or Jira for tasks labeled as good first issue
or help wanted
.
Use the format:
git checkout -b feature/issue-number-short-description development
Example:
git checkout -b feature/42-fix-navbar development
Follow the project structure and coding standards.
Use a descriptive message including the issue or ticket number:
git commit -m "feat(issue-42): fix navbar responsiveness"
git push origin feature/42-fix-navbar
Navigate to the original repository and click "New Pull Request." Select development as destination and your branch in from. Link the issue your PR addresses and describe your changes.
By participating in this project, you agree to abide by our Code of Conduct.
Join our community to stay updated and collaborate:
- GitHub Discussions
- [Slack/Discord (Coming Soon)]
Spark is licensed under the MIT License.
Feel free to suggest changes or improvements to make Spark even better! Let's build something meaningful together. π