A CTF for Poolesville High School
We welcome all contributions to CTFalcon! We believe this project is a great way to get started with development workflows and web development. Please see CONTRIBUTING.md for more information on contributing.
This project uses Neon Branches and Github Actions to deploy previews for every pull request. This offers a production-like testing environment and should be used to test for bugs.
This project uses Github Actions to deploy to production. This will be done automatically when a pull request is merged into main
.
This project uses ESLint and Prettier to lint and format files. This will be run automatically on every push, but will block pull requests. Please run it locally with npm run lint
.
This section provides a high-level start guide for running this app. We suggest using VSCode as your IDE, but any text editor will work.
- Node.js
- NPM & NPX (should be installed with Node.js)
- PostgreSQL
- Git
If you don't have branch access to the repository, please follow this guide. If you do, please follow the Branch Access Development guide. Fork the repository. Clone your fork of the repository
git clone https://github.com/<YOURUSERNAME>/ctfalcon-new.git && cd ctfalcon-new
# or if you want to clone it to the current directory
# git clone https://github.com/Poolesville-Computer-Team/ctfalcon-new.git .
Clone the repository
git clone https://github.com/Poolesville-Computer-Team/ctfalcon-new.git && cd ctfalcon-new
# or if you want to clone it to the current directory
# git clone https://github.com/Poolesville-Computer-Team/ctfalcon-new.git .
Create a new branch locally with the same name.
git checkout -b <BRANCHNAME>
Create a new database
createdb ctfalcon
Enter the database
psql ctfalcon
Check port number
\conninfo
Duplicate and rename .env.example
to .env
Set DATABASE_URL
and DIRECT_URL
to postgres://user:password@localhost:<PORTNUMBER>/ctfalcon
You should use the user provided by \conninfo
and there shouldn't be a password by default, so your connection string should look like postgres://<USER>@localhost:<PORTNUMBER>/ctfalcon
Install dependencies
npm install
Run migrations on database
npx prisma migrate dev
Seed the database
npx prisma db seed
Run the app
npm run dev
You should be able to find the app at localhost:5173
To make changes to production, check out the Contributing section.