Coder Social home page Coder Social logo

ismail-arame / ctf-platform Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 5.19 MB

CTF Platform where student participate and compete to solve capture the flag challenges and get higher in the scoarboard to win the competition

Dockerfile 0.41% JavaScript 20.13% TypeScript 76.90% CSS 2.55%

ctf-platform's Introduction

this project is built using :

MERN stack (Mongodb, Express, React, Nodejs) , nextjs for server side rendering and typescript for type checking, authentication is done using JWT (Json Web Token) and Docker for running the platform in a container.

to run the platform localy we will be using docker, you have to set envirenment varaibles in both frontend and backend in order to make it work perfectly.

Frontend :

you will have to create a .env.local file and set this in its content:

NEXT_PUBLIC_API_ENDPOINT=http://localhost:8000 #(if you want to run docker on a production server make sure to set the public ip of the server instead of localhost like this http://10.0.0.1:8000) ACCESS_TOKEN_SECRET=dpUr3rSW2ShkmMYTjZx57nsPbevLWgnjLqvvbtIO

Backend :

you will have to create a .env file and set this in its content:

PORT=8000 NODE_ENV=development (production in case of running it in production server) DATABASE_URL=mongodb+srv://username:[email protected]/ #(connect to your mongodb atlas account and get a DATABASE_URL) DEFAULT_PICTURE=https://res.cloudinary.com/dkd5jblv5/image/upload/v1675976806/Default_ProfilePicture_gjngnb.png ACCESS_TOKEN_SECRET=dpUr3rSW2ShkmMYTjZx57nsPbevLWgnjLqvvbtIO REFRESH_TOKEN_SECRET=aUXDBHCwFvKUwunkujh8kJqq3RQp8bxmMJ7OF8Eb

Running Docker Container :

sudo docker build -t ctf-platform .
sudo docker run -p 8000:8000 -p 80:80 -d ctf-platform

Platform Design :

Challenges Page :

1.jpg

Scoreboard Page :

2.jpg

Home Page :

3.jpg

Challenges Solved by competitor Page :

4.jpg

List of Users Page :

5.jpg

Register Page :

6.jpg

Login Page :

7.jpg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.