algorithmic-arena's People
Forkers
ashutoshpadhi629 soumyasen10 tanmaydhobale tarunclub destroyer-cm7 afzal-husen ankur1493 ssk090 krismandanka adi790uu hiteshsharma-gh mattiullah134 shubhammewara rohan-hazari rahulpandey70 0x-pankaj paras0750 rudra-sankha-sinhamahapatra akash5307 pritam12f himanshuupreti02 legendkartik45 karthik120710 chayansd kar-saini letscodedanish gaurav12devloper rahulagg7 rohitranjan-2702 jasmineyadav7788 imanasdash pranavdua02 uttamsutariya vineetprash arpitblagan dillu786 hvz11 abubaker779 iharsh02 amitmishra321 sujiththirumalaisamy neon-20 yogesh1801 alphacoder-mp3 dhruvchandak30 sid8109 siinghd aniruddha-vs ajaydeep123 ankitmohanty2 murali03m dollysingh3192 kushwahramkumar2003 sm2774us akshatarora130 mohitejaikumar maniteja0126 rohithreddy009 shuaibu-shehu kushalnareda aytullahdev rafee-mohamed bhutoria dipakkhade ashish98joshi hsraktu17 ashik763 shindeamul76 sammamama varundeepsaini jkrishnad anuragnegi000 rohitdhakane6 viveksuyal37 coderabhay332 ramya24-eng chiragcj27 codyharsh2 probablyarth kanhavvohra haddercone mcace007 ziaulhaq11 ameerjafar dhanushprabakaran ramanuj07 vijayravichander vijay-kumar-bantu senthil-athiban 1muddassir-siddiqui akashgirme swataswayam-14 jtiscodin imran1khan victorchrollo14 jaypatidar14 gurkirxt ayushshivhare79 meet503186 pranavx1algorithmic-arena's Issues
user is able to sign in, without even filling details
proper auth system should be there, currently there is not proper auth
create a docker_setup to run the project locally
docker setup, with running apps/web and apps/submission-webhook together with db running locally
[SUGGESTION] How about writing E2E Tests (Backend Specific)?
I could see three services in this repository:
- A PostgreSQL DB
- Redis (Caching and Queue)
- Express as a store of APIs
We should move towards writing tests for it! Unit Tests are fast but only test the business logic (they can't test whether the SQL query written is actually correct, a code passing all the unit tests might fail the code in production!) and Integration tests are slow (can become a headache for developers).
Therefore we can move to E2E Tests. These tests are faster than Integration tests and can be extended to test the action of these services!
So the route is simple:
-
We need to setup testing instances of all the services, as tests should not contact the real instances.
docker compose
can be a good idea for this. -
We need to replace the the actual services with the testing instances when tests are running, that means
Dependency Injection
.
But there are some problems:
a) Dependency Injection Design Pattern: As far I know, there is no good library available for this in Nodejs. tsyringe
is there, but it also uses a global instance of container, hence second point can't be achieved!
b) Docker might make the CI slow!
Solutions:
a) Traditional way of Dependency Injection (in JAVA) is by using Constructors and decorators on controllers but JS is a functional programming, so either we have to migrate to a new OOPs based framework like Nestjs
or we might use a hack by just changing the protocol to GraphQL and using the context
variable for Dependency Injection.
b) Caching in DockerFile
and multi stage builds can fix this.
See this repo: https://github.com/Manik2708/Hi_Server which is implemented in Nestjs
with E2E Tests and docker compose
in CI.
Merge judge0 and our own db
Make our db schema such that judge0 can directly talk to it
Enhance dev env
Can we make the cloudflare captcha only work at production?
- Make the cloudflare captcha only work at production
add a discord server, for doughts help
please add a discord server for this project, that would be agreat help
Ans are not Submiting
After Writing Code its not Submiting
Suggestion : Add Custom Checkers
Currently, the answers are checked by matching each token of the output with the correct and
But for questions that have more than one correct answer, this might be wrong
For eg if the question is to print an odd number between a and b there can be multiple odd numbers that can be printed
I suggest allowing the problem setters to add custom checkers which will take the output of the users and then return the verdicts
For the example of odd numbers the script will check if the output is odd and is between a and b
Bug: Test Case Count Incorrectly Displayed as 0 in Problem Submission Table
Bug Description:
In the problem submission table, the number of test cases passed for each submission is always displayed as 0, regardless of the actual number of test cases that were passed. This issue persists across all problem submissions and misleads users regarding the success of their code.
Steps to Reproduce:
- Navigate to the problem submission page.
- Submit a solution to any coding problem.
- Observe the "Test Cases Passed" column in the submission table
Expected Behavior:
The "Test Cases Passed" column should reflect the actual number of test cases passed for each submission.
Actual Behavior:
The "Test Cases Passed" column displays 0 test cases passed for every submission.
Screenshots:
Mount the test cases directly on judge0
Right now, our test cases have to go to judge0 via an HTTP call
If the test cases are very big, then you send a very big payload in an http call
If the test cases were direclty mounted on the judge0 server, then they can be directly picked up from there
Add Dark mode (enhancement)
Rate limt every user
A single user should be able to send at max 2 requests / 10 seconds
This should be done in a distributed way, use redis to store the rate at which the user is sending requests
dark mode is bonked
Feat : Add Support for long long
Currently, only int can be taken as an input or output for a problem
add a way to take larger numbers as well up to 1e18
k8s files to deploy this to a cluster
Auto add problems to the DB
Anytime there is a problem submission that is made (similar to https://github.com/code100x/algorithmic-arena/pull/54/files#diff-61558a2c20b5fca331bfb30009dcd693af0267be01f204f658f960b9f50befba ), we should push this problem (hidden) in the DB via a CI/CD pipeline
[FIX]: Use Yarn as the Package Manager
Currently having both npm and yarn. Migrate fully to yarn and fix some linting issues when using yarn as the package manager.
Add husky in the project
currently in our project we don't have husky if we add husky it is very useful to check(commit message) or lint the project before the actually commit has made.
Race condition of test_cases status updates and latency in submission status updates
@hkirat
Is it correct way of solving this problem since Redis in single threaded so it gives us feature of mutex lock which will help to resolve this .
Since we want three things
- Maximum time
- Maximum memory
- Submission Status (AC or Reject)
These all three things will be handled by submission-callback endpoint
And Nextjs API used for polling will eventually show data on basis of this Redis
Add support for java
Need to add boilerplate generators
Migrate to pnpm
Currently the dependencies are not uptodate. Turbo version complaining on the key tasks. Which is migrated from pipeline key in the turbo@1^ to turbo@2^.
Migrate to pnpm. Update the scripta and fix all the dependencies and push the latest lock file.
Feature: UI for problem setters to add problem
Currently, to add problems, problem setters needs to clone the repo (which will probably be private at a later stage in production, so granting permission might be an overhead in that case) and then create a PR.
How about creating an interactive UI to add problems?
Rough sketch of what I am planning
Also, I have some ideas regarding the automation of other steps regarding this, so that the effort required by admin is minimum.
Please let me know whether you guys want this feature.
Docker compose is not working
Suggestion : Add a workflow to generate respective outputs of the testcases
Currently, the problem setter has to run the test cases manually and then write them to their respective files which is annoying if there are many test cases
Add a shell script which runs the solution file on the input and writes the output to their respective files
Add suppport for golang
I'll work on this
having this issue while running pnpm dlx turbo db:migrate && yarn install
Datasource "db": PostgreSQL database "algo-arena", schema "public" at "localhost:5432"
│
│ Error: P1001: Can't reach database server at localhost:5432
│
│ Please make sure your database server is running at localhost:5432
.
│ ELIFECYCLE Command failed with exit code 1.
│ command finished with error: command (/Users/veerpratap/Desktop/Cohort-3/algorithmic-arena/packages/db) /opt/homebr
│ ew/bin/pnpm run db:migrate exited (1)
└────>
ERROR run failed: command exited (1)
Add invisible captcha on submission endpoint
read about it here - https://blog.cloudflare.com/turnstile-private-captcha-alternative
change default footer
rn , the footer seems old and default, and no links are working.
Create a search and filter functionality for problems
Clicking on submit button should refresh the local captcha token
If I submit twice, it doesnt go in the second time
not able to start locally
server is crashing, please help how can i start prooject locally, i followed the insterection from read_me.md but nothing is working
and databse_url should be this DATABASE_URL="postgresql://postgres:supersecurepassword@localhost:5432/algo-arena"
Recording.2024-07-03.172753.mp4
Support 2d arrays
2 dimensional arrays can be added to Structure.md
Should be parsed for every language
Create k8s manifests
Make sure user cant see/submit problems pre-contest
WE need to protect a few routes to ensure user isnt able to hit submit endpoints/see problems before a contest starts.
After the contest we need to make sure user cant send an activeContest
variable, and if they do, their request is rejected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.