├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── gh-pages.yml ├── .gitignore ├── CITATION.cff ├── LICENSE ├── README.md ├── README_EN.md └── website ├── README.md ├── babel.config.js ├── docs ├── deployment │ └── docker-compose.mdx └── manual │ ├── manager │ ├── contest.md │ ├── judgetemplate.md │ ├── problem.md │ └── user.md │ └── user │ ├── contest.md │ ├── home.md │ ├── problem.md │ ├── submission.md │ └── user.md ├── docusaurus.config.js ├── i18n └── en │ ├── code.json │ ├── docusaurus-plugin-content-blog │ └── options.json │ ├── docusaurus-plugin-content-docs │ ├── current.json │ └── current │ │ └── deployment │ │ └── docker-compose.mdx │ └── docusaurus-theme-classic │ ├── footer.json │ └── navbar.json ├── package.json ├── sidebars.js ├── src ├── css │ └── custom.css ├── mdx.d.ts └── pages │ ├── index.module.css │ └── index.tsx ├── static ├── .nojekyll └── img │ ├── home │ ├── image-20201122203804615.png │ ├── image-20201122204545807.png │ ├── image-20201122210911513.png │ ├── image-20201122210935648.png │ ├── image-20201122211047407.png │ ├── image-20201122211144679.png │ ├── image-20201122211232174.png │ ├── image-20201122211308172.png │ ├── image-20201122212148575.png │ ├── image-20201122212415897.png │ ├── image-20201122212452051.png │ ├── image-20201122212524787.png │ ├── image-20201122212606712.png │ ├── image-20201122212835905.png │ └── image-20201122212903607.png │ ├── manager-manual │ ├── image-20201201233733717.png │ ├── image-20201201233817834.png │ ├── image-20201201233915688.png │ ├── image-20201201234006454.png │ ├── image-20201201234049167.png │ ├── image-20201201234123922.png │ ├── image-20201201234357191.png │ ├── image-20201201234438802.png │ ├── image-20201201234512472.png │ ├── image-20201204221652364.png │ ├── image-20201204221734955.png │ ├── image-20201204221830240.png │ ├── image-20201204222030825.png │ ├── image-20201204222206973.png │ ├── image-20201204222800604.png │ ├── image-20201204222911487.png │ ├── image-20201204223004581.png │ ├── image-20201204223028716.png │ ├── image-20201204223046228.png │ ├── image-20201204223220106.png │ ├── image-20201204223239414.png │ ├── image-20201205230529573.png │ ├── image-20201205231615733.png │ ├── image-20201206232355529.png │ └── image-20201206232822984.png │ ├── sduoj-logo.svg │ └── user-manual │ ├── 160467098269.jpg │ ├── 160467098321.jpg │ ├── 160467098391.jpg │ ├── 160467098448.jpg │ ├── 160467098495.jpg │ ├── 160467098555.jpg │ ├── 160467098653.jpg │ ├── 160467098700.jpg │ ├── 160467098741.jpg │ ├── 160467098779.jpg │ ├── 160467098836.jpg │ ├── 160467098889.jpg │ ├── 160467098939.jpg │ ├── 160467098981.jpg │ ├── 160467099027.jpg │ ├── 160467099073.jpg │ ├── 160467099188.jpg │ ├── 160467099274.jpg │ ├── 160467099325.jpg │ ├── 160467099373.jpg │ ├── 160467099416.jpg │ ├── 160467099466.jpg │ ├── 160467099522.jpg │ ├── 160467099571.jpg │ ├── 160467099616.jpg │ ├── 160467099715.jpg │ ├── 160467099865.jpg │ ├── 160467099938.jpg │ ├── 160467099994.jpg │ ├── 160467100047.jpg │ ├── 160467100089.jpg │ ├── 160467100118.jpg │ └── 160467100147.jpg ├── tsconfig.json └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | * text eol=lf 3 | 4 | # Don't do anything with binaries 5 | *.png binary 6 | *.jpg binary 7 | *.svg binary 8 | *.jpeg binary 9 | 10 | *.js linguist-language=Java 11 | *.css linguist-language=Java 12 | *.ts linguist-language=Java 13 | *.tsx linguist-language=Java 14 | *.json linguist-language=Java 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us fix bug 4 | title: '' 5 | labels: 'status: waiting-for-triage' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior (If applicable, add screenshots to help explain your problem): 15 | 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | **Expected behavior** 22 | A clear and concise description of what you expected to happen. 23 | 24 | **Environment:** 25 | 26 | - OS: [e.g. Ubuntu 22.04] 27 | - CPU: [e.g. 4 Core] 28 | - RAM: [e.g. 16 GB] 29 | - Disk: [e.g. 20 GB] 30 | - Docker Version: [e.g. 23.0.2] 31 | - Docker-compose-plugin Version: [e.g. 2.17.2] 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: gh-pages 2 | 3 | on: 4 | workflow_dispatch: # allow running this workflow manually from the Actions tab 5 | push: 6 | branches: 7 | - main 8 | paths: 9 | - '.github/workflows/**' 10 | - 'website/**' 11 | 12 | permissions: 13 | contents: read 14 | pages: write 15 | id-token: write 16 | 17 | concurrency: 18 | group: "pages" 19 | cancel-in-progress: false 20 | 21 | jobs: 22 | build: 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v4 26 | 27 | - uses: actions/setup-node@v3 28 | with: 29 | node-version: 18 30 | cache: "yarn" 31 | cache-dependency-path: website/yarn.lock 32 | 33 | - name: Build 34 | run: | 35 | cd website 36 | yarn 37 | yarn build 38 | 39 | - name: Setup Pages 40 | uses: actions/configure-pages@v5 41 | 42 | - name: Upload artifact 43 | uses: actions/upload-pages-artifact@v3 44 | with: 45 | path: "./website/build" 46 | 47 | deploy: 48 | needs: build 49 | runs-on: ubuntu-latest 50 | environment: 51 | name: github-pages 52 | url: ${{ steps.deployment.outputs.page_url }} 53 | steps: 54 | - name: Deploy to GitHub Pages 55 | id: deployment 56 | uses: actions/deploy-pages@v4 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IntelliJ project files 2 | .idea/ 3 | *.iml 4 | *.ipr 5 | *.iws 6 | out 7 | gem 8 | 9 | # VS Code project files 10 | .vscode/ 11 | 12 | **.gpg 13 | 14 | # Dependencies 15 | node_modules 16 | 17 | # Production 18 | build 19 | 20 | # Generated files 21 | .docusaurus 22 | .cache-loader 23 | 24 | # Misc 25 | .DS_Store 26 | .env.local 27 | .env.development.local 28 | .env.test.local 29 | .env.production.local 30 | Thumbs.db 31 | 32 | npm-debug.log* 33 | yarn-debug.log* 34 | yarn-error.log* 35 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | title: SDUOJ 3 | message: 'If you use SDUOJ, please cite it as below.' 4 | type: software 5 | authors: 6 | - given-names: SDUOJ 7 | repository-code: 'https://github.com/SDUOJ/OnlineJudge' 8 | version: 0.0.1-SNAPSHOT 9 | date-released: '2020-10-7' 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published by 637 | the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 简体中文 3 | | 4 | English 5 |

6 | 7 | 8 |
9 | 10 | 11 | 12 | *如果觉得对您有帮助或者对该产品感兴趣,请您给点一个 Star,谢谢!* 13 | 14 | # SDUOJ/[Online Judge](https://docs.sduoj.com) 15 | 16 | [![Java](https://img.shields.io/badge/Java-8-informational)](http://openjdk.java.net/) 17 | [![WebSite](https://img.shields.io/website?up_message=docs.sduoj.com&url=https%3A%2F%2Fdocs.sduoj.com%2F)](https://docs.sduoj.com/) 18 | [![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.1.12-success)](https://spring.io/projects/spring-boot) 19 | [![Spring Cloud](https://img.shields.io/badge/Spring%20Cloud-Greenwich.SR5-success)](https://spring.io/projects/spring-cloud) 20 | [![Spring Cloud Alibaba](https://img.shields.io/badge/Spring%20Cloud%20Alibaba-2.1.2-success)](https://spring.io/projects/spring-cloud-alibaba) 21 | [![MySQL](https://img.shields.io/badge/MySQL-8-blue)](https://www.mysql.com/) 22 | [![Vue](https://img.shields.io/badge/Vue-2.6.11-success)](https://vuejs.org/) 23 | [![License](https://img.shields.io/github/license/SDUOJ/OnlineJudge)](https://github.com/SDUOJ/OnlineJudge/blob/main/LICENSE) 24 | [![Github Star](https://img.shields.io/github/stars/SDUOJ/OnlineJudge?style=social)](https://github.com/SDUOJ/OnlineJudge) 25 | 26 | > SDUOJ 是一款开源在线评测系统(Online Judge, OJ) 27 | > 28 | > [→ 查看文档](https://docs.sduoj.com) 29 | > 30 | 31 |
32 | 33 | 34 | 35 | 39 | 43 | 47 | 48 |
36 |

多业务场景

37 |

评测模板、一题多面、虚拟评测、国际赛制(ICPC/OI/IOI),广泛适用于实验训练、学生测试、赛事举办等场景

38 |
40 |

分布式架构

41 |

基于微服务设计,模块细分更适合业务迭代,分布式架构为高并发、高容错、高可用提供支持

42 |
44 |

容器级交付

45 |

提供 Docker 镜像,公有云或物理机,均可一键部署,一键扩缩容,以应对不同的流量场景和评测压力

46 |
49 | 50 | 51 | ## 概览 52 | 53 | * 基于 Docker,公有云或物理机,均可一键部署! 54 | * 前后端分离,分布式微服务架构,可单独对某个服务动态扩缩容以应对不同场景的流量压力! 55 | * 评测机的多核平台调度方案,单点评测、多点评测,按需配置! 56 | * 多种国际赛制支持(ICPC/OI/IOI)! 57 | * 评测模板,可自定义添加多语言支持!更有进阶模式支持数据结构课设、汇编语言实验、操作系统课设等个性化评测场景! 58 | * 一题多面,同一道题目,可有多个题面!可支持中文、英文、俄文等多语言!可支持复杂、精炼、变形题面等多形式! 59 | * Markdown & HTML 题面支持,随意创作丰富多彩的题面! 60 | * 动态评测,提交后每个评测点实时返回评测结果! 61 | * 多评测点,单独赋分,动态调整测试点的顺序,直接选取测试点作为题面样例点! 62 | * ~~虚拟评测,支持世界上多个知名 OJ 系统的远程提交,让训练数据沉淀到一方系统,为未来传承宝贵的数据资产!~~ 63 | 64 | ## 项目仓库 65 | 66 | | 仓库 | 描述 | 67 | | ------------------------------------------------------------ | ------------------------------------ | 68 | | [SDUOJ/OnlineJudge](https://github.com/SDUOJ/OnlineJudge) | 产品主仓库、文档、Issue Tracker | 69 | | [SDUOJ/sduoj-server](https://github.com/SDUOJ/sduoj-server) | 后端代码仓库 | 70 | | [SDUOJ/sduoj-web](https://github.com/SDUOJ/sduoj-web) | 用户前端代码仓库 | 71 | | [SDUOJ/sduoj-manage](https://github.com/SDUOJ/sduoj-manage) | 管理员前端代码仓库 | 72 | | [SDUOJ/sduoj-judger](https://github.com/SDUOJ/sduoj-judger) | 评测机代码仓库 | 73 | | [SDUOJ/sduoj-sandbox](https://github.com/SDUOJ/sduoj-sandbox) | 安全沙箱代码仓库 | 74 | | [SDUOJ/sduoj-deploy](https://github.com/SDUOJ/sduoj-deploy) | 部署代码仓库,含 Docker Compose 脚本 | 75 | 76 | ## 网站截图 77 | 78 | [用户使用手册](https://docs.sduoj.com/docs/manual/user/home) 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
89 | 更多截图,点击展开 90 |
91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 |
110 | 111 | ## 搭建指南 112 | 113 | 架构图: 114 | 115 | [如何基于 Docker Compose 快速部署?](https://docs.sduoj.com/docs/deployment/docker-compose) 116 | 117 | ## 浏览器支持 118 | 119 | For Vue frontend: 120 | - Modern browsers (chrome, firefox) 和 Internet Explorer 10+. 121 | 122 | For React frontend: 123 | - Microsoft Edge (85+), Google Chrome (85+), Mozilla Firefox (79+), Apple Safari (13.4+), Internet Explorer is not supported 124 | 125 | ## Star History 126 | 127 | [![Star History Chart](https://api.star-history.com/svg?repos=SDUOJ/OnlineJudge&type=Date)](https://star-history.com/#SDUOJ/OnlineJudge&Date) 128 | 129 | ## 技术团队 130 | 131 | 132 | 133 | 140 | 147 | 154 | 155 | 156 | 163 | 170 | 177 | 178 | 179 | 186 | 193 | 200 | 201 | 202 | 209 | 216 | 223 | 224 |
134 | 135 |
136 | zhangt2333 137 |
138 | Leader, Backend 139 |
141 | 142 |
143 | yhf2000 144 |
145 | Leader, Frontend 146 |
148 | 149 |
150 | jesHrz 151 |
152 | Leader, Sandbox 153 |
157 | 158 |
159 | koi2000 160 |
161 | Honorary MBR. 162 |
164 | 165 |
166 | HYLazy 167 |
168 | Honorary MBR. 169 |
171 | 172 |
173 | zhaoyifan0528 174 |
175 | Honorary MBR. 176 |
180 | 181 |
182 | OldAtaraxia 183 |
184 | Honorary MBR. 185 |
187 | 188 |
189 | zhr2001 190 |
191 | Honorary MBR. 192 |
194 | 195 |
196 | sys16384 197 |
198 | Honorary MBR. 199 |
203 | 204 |
205 | GeneLiuXe 206 |
207 | Honorary MBR. 208 |
210 | 211 |
212 | suxb201 213 |
214 | Honorary MBR. 215 |
217 | 218 |
219 | Xrvitd 220 |
221 | Honorary MBR. 222 |
225 | 226 | 227 | 228 | ## 开源许可 229 | 230 | 基于 [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0.en.html) 开源协议。 231 | 232 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 |

2 | 简体中文 3 | | 4 | English 5 |

6 |
7 | 8 | 9 | 10 | *If you find this helpful or interesting, please give it a star. Thank you!* 11 | 12 | # SDUOJ/[Online Judge](https://docs.sduoj.com) 13 | 14 | [![Java](https://img.shields.io/badge/Java-8-informational)](http://openjdk.java.net/) 15 | [![WebSite](https://img.shields.io/website?up_message=docs.sduoj.com&url=https%3A%2F%2Fdocs.sduoj.com%2F)](https://docs.sduoj.com/) 16 | [![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.1.12-success)](https://spring.io/projects/spring-boot) 17 | [![Spring Cloud](https://img.shields.io/badge/Spring%20Cloud-Greenwich.SR5-success)](https://spring.io/projects/spring-cloud) 18 | [![Spring Cloud Alibaba](https://img.shields.io/badge/Spring%20Cloud%20Alibaba-2.1.2-success)](https://spring.io/projects/spring-cloud-alibaba) 19 | [![MySQL](https://img.shields.io/badge/MySQL-8-blue)](https://www.mysql.com/) 20 | [![Vue](https://img.shields.io/badge/Vue-2.6.11-success)](https://vuejs.org/) 21 | [![License](https://img.shields.io/github/license/SDUOJ/OnlineJudge)](https://github.com/SDUOJ/OnlineJudge/blob/main/LICENSE) 22 | [![Github Star](https://img.shields.io/github/stars/SDUOJ/OnlineJudge?style=social)](https://github.com/SDUOJ/OnlineJudge) 23 | 24 | > SDUOJ is an open-source online judge (OJ) 25 | > 26 | > [→ View Documentation](https://docs.sduoj.com) 27 | > 28 | 29 |
30 | 31 | 32 | 33 | 37 | 41 | 45 | 46 |
34 |

Multiple Business Scenarios

35 |

Judging-template, multi-description problem, virtual judge, international competition formats (ICPC/OI/IOI), suitable for algorithm training, student exams, competition hosting, and other scenarios

36 |
38 |

Distributed Architecture

39 |

Based on microservices design, detailed modules are more suitable for business iterations. Distributed architecture supports high concurrency, high fault tolerance, and high availability.

40 |
42 |

Container-level Delivery

43 |

Offers Docker images for one-click deployment on cloud or physical machines. Easily scale up or down to accommodate different traffic scenarios and evaluation pressures.

44 |
47 | 48 | 49 | ## Overview 50 | 51 | * Based on Docker, deployable with one click on clouds or physical machines! 52 | * Frontend and backend separation with distributed microservices architecture. Dynamically scale individual services to handle different traffic pressures! 53 | * Judging system with multi-core scheduling. Single-point or multi-point judging are configurable! 54 | * Supports various international competition formats (ICPC/OI/IOI)! 55 | * Judge templates allow for custom multi-language support! Advanced modes support personalized judging scenarios such as data-structure coursework, assembly language experiments, and operating system projects! 56 | * Multi-description problems, where a single problem can have multiple description! Supports languages like Chinese, English, Russian, and formats like complex, concise, or altered presentations! 57 | * Markdown & HTML description support, create colorful and diverse problems! 58 | * Dynamic judging, real-time results after submission for each checkpoint! 59 | * Multiple checkpoints, separate scoring, dynamic order adjustment of checkpoints, and direct selection of checkpoints as problem examples! 60 | * ~~Virtual judge, supporting remote submissions to several well-known OJ systems, accumulating valuable data assets for the future!~~ 61 | 62 | 63 | ## Repositories 64 | 65 | | Repositories | Description | 66 | | ------------------------------------------------------------ | ------------------------------------ | 67 | | [SDUOJ/OnlineJudge](https://github.com/SDUOJ/OnlineJudge) | Main repository, documentation, Issue Tracker | 68 | | [SDUOJ/sduoj-server](https://github.com/SDUOJ/sduoj-server) | Backend code | 69 | | [SDUOJ/sduoj-web](https://github.com/SDUOJ/sduoj-web) | User frontend code | 70 | | [SDUOJ/sduoj-manage](https://github.com/SDUOJ/sduoj-manage) | Manager frontend code | 71 | | [SDUOJ/sduoj-judger](https://github.com/SDUOJ/sduoj-judger) | Judger code | 72 | | [SDUOJ/sduoj-sandbox](https://github.com/SDUOJ/sduoj-sandbox) | Sandbox code | 73 | | [SDUOJ/sduoj-deploy](https://github.com/SDUOJ/sduoj-deploy) | Deploying Code, with Docker Compose Scripts | 74 | 75 | ### Website Screenshots 76 | 77 | [See User Manual](https://docs.sduoj.com/docs/manual/user/home) 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
88 | Click here for More Screenshots 89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
109 | 110 | ## Deployment 111 | 112 | Architecture diagram: 113 | 114 | [How to deploy quickly based on Docker Compose?](https://docs.sduoj.com/docs/deployment/docker-compose) 115 | 116 | ## Browser Support 117 | 118 | For Vue frontend: 119 | - Modern browsers (chrome, firefox) 和 Internet Explorer 10+. 120 | 121 | For React frontend: 122 | - Microsoft Edge (85+), Google Chrome (85+), Mozilla Firefox (79+), Apple Safari (13.4+), Internet Explorer is not supported 123 | 124 | ## Star History 125 | 126 | [![Star History Chart](https://api.star-history.com/svg?repos=SDUOJ/OnlineJudge&type=Date)](https://star-history.com/#SDUOJ/OnlineJudge&Date) 127 | 128 | ## Our Team 129 | 130 | 131 | 138 | 145 | 152 | 153 | 154 | 161 | 168 | 175 | 176 | 177 | 184 | 191 | 198 | 199 | 200 | 207 | 214 | 221 | 222 |
132 | 133 |
134 | zhangt2333 135 |
136 | Leader, Backend 137 |
139 | 140 |
141 | yhf2000 142 |
143 | Leader, Frontend 144 |
146 | 147 |
148 | jesHrz 149 |
150 | Leader, Sandbox 151 |
155 | 156 |
157 | koi2000 158 |
159 | Honorary MBR. 160 |
162 | 163 |
164 | HYLazy 165 |
166 | Honorary MBR. 167 |
169 | 170 |
171 | zhaoyifan0528 172 |
173 | Honorary MBR. 174 |
178 | 179 |
180 | OldAtaraxia 181 |
182 | Honorary MBR. 183 |
185 | 186 |
187 | zhr2001 188 |
189 | Honorary MBR. 190 |
192 | 193 |
194 | sys16384 195 |
196 | Honorary MBR. 197 |
201 | 202 |
203 | GeneLiuXe 204 |
205 | Honorary MBR. 206 |
208 | 209 |
210 | suxb201 211 |
212 | Honorary MBR. 213 |
215 | 216 |
217 | Xrvitd 218 |
219 | Honorary MBR. 220 |
223 | 224 | 225 | 226 | ## License 227 | 228 | Released under the [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0.en.html). 229 | 230 | -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | ### Get started 4 | 5 | Make sure that node v18.17.0 and npm v9.6.7 or their higher version are installed. 6 | 7 | ### Installation 8 | 9 | ``` 10 | $ npm install -g yarn 11 | $ yarn 12 | ``` 13 | 14 | ### Local Development 15 | 16 | ``` 17 | $ yarn start 18 | ``` 19 | 20 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 21 | 22 | ### Build 23 | 24 | ``` 25 | $ yarn build 26 | ``` 27 | 28 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 29 | -------------------------------------------------------------------------------- /website/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve("@docusaurus/core/lib/babel/preset")], 3 | }; 4 | -------------------------------------------------------------------------------- /website/docs/deployment/docker-compose.mdx: -------------------------------------------------------------------------------- 1 | import Tabs from "@theme/Tabs"; 2 | import TabItem from "@theme/TabItem"; 3 | 4 | # Docker Compose 快速部署 5 | 6 | ## 前言 7 | 8 | 本章节中只描述如何做到**最快速**地搭建一个 SDUOJ,不建议长期用作生产。 9 | 10 | :::danger 注意 11 | SDUOJ 尚未发布第一个稳定版本,对于生产用途 SDUOJ 开发者建议大家持观望态度。 12 | ::: 13 | 14 | ## 先决条件 15 | 16 | ### 操作系统 17 | 18 | - Linux(已测试:Ubuntu 20.04, Ubuntu 22.04, Debian 10) 19 | - macOS(已测试:Ventura 13.4.1) 20 | - ~~Windows~~(不支持!) 21 | 22 | ### 必备软件 23 | 24 | - [git](https://git-scm.com/) 25 | - [docker](https://docs.docker.com/get-docker/):版本大于等于 `23.0.2` 26 | - [docker-compose-plugin](https://docs.docker.com/compose/install/linux/):版本大于等于 `2.17.2` 27 | 28 | 可使用以下命令验证: 29 | 30 | ```shell 31 | git version 32 | docker -v 33 | docker compose version 34 | ``` 35 | 36 | ## 安装必备软件(在 Ubuntu、Debian 系统) 37 | 38 | > 如果您的环境已装有,请跳过这一步 39 | 40 | 41 | 42 | 43 | ```shell 44 | export DOWNLOAD_URL="https://mirrors.cernet.edu.cn/docker-ce" 45 | sudo apt-get update \ 46 | && sudo apt-get install -qq -y curl git \ 47 | && curl -fsSL https://get.docker.com/ | sudo -E sh 48 | ``` 49 | 50 | 51 | 52 | 53 | ```shell 54 | sudo apt-get update \ 55 | && sudo apt-get install -qq -y curl git \ 56 | && curl -fsSL https://get.docker.com/ | sudo -E sh 57 | ``` 58 | 59 | 60 | 61 | 62 | ## 单机部署(伪分布式,All-in-One) 63 | 64 | :::tip 尝鲜机器建议 65 | 66 | - 在云服务厂商使用**按量计费模式**开启一个云服务器,16G 或以上大小的内存 67 | - 虚拟机上安装一个 Linux 发行版(强烈推荐 Ubuntu 22.04) 68 | 69 | ::: 70 | 71 | 如果您只是打算尝试**简单地**部署一个 SDUOJ,对其进行探索和尝鲜的话,执行以下指令即可: 72 | 73 | - 拉取 `sduoj-deploy` 项目代码 74 | 75 | ```shell 76 | git clone https://github.com/SDUOJ/sduoj-deploy.git 77 | ``` 78 | 79 | - 进入 `sduoj-deploy` 项目目录 80 | 81 | ```shell 82 | cd sduoj-deploy 83 | ``` 84 | 85 | - 执行 `docker compose`(注意不是 `docker-compose`)启动编排好的各个服务 86 | 87 | ```shell 88 | sudo docker compose up 89 | ``` 90 | 91 | - 在 URL 中访问你的服务器 IP 即可,例如:`http://127.0.0.1:80/`,其中 `127.0.0.1` 换成你的服务器 IP 92 | 93 | 一些初始账号如下,安全起见请注意修改: 94 | 95 | - SDUOJ 的初始账号密码分别为 `superadmin`、`123456`,注意修改。 96 | - Nacos 的初始账号密码分别为 `sduoj`、`sduoj`,注意修改。 97 | - MySQL 的初始账号密码分别为 `sduoj`、`sduoj`,注意修改。 98 | 99 | :::warning 注意 100 | 数据库、消息队列、Nacos 服务的端口是暴露的,如果是在公有云上进行临时生产,建议配置**网络安全组**,仅暴露需要的 22、80 等端口。在自己的物理服务器上同理。 101 | ::: 102 | -------------------------------------------------------------------------------- /website/docs/manual/manager/contest.md: -------------------------------------------------------------------------------- 1 | # 比赛管理 2 | 3 | ## 比赛列表 4 | 5 | ![img](/img/manager-manual/image-20201205230529573.png) 6 | 7 | 8 | ## 比赛基本信息修改 9 | 10 | 点击 `Edit` 即可对选定的比赛进行修改: 11 | 12 | * 标题 13 | * 模式:主要是 `OI`、`IOI`、`ACM` 14 | * 公开在比赛列表 15 | * 可见性:`public`、`protected`、`private` 16 | * 密码 17 | * 开始时间、持续时长、结束时间 18 | * 比赛源信息 19 | * 比赛公告 20 | * 参与者 21 | * 非官方参与者 22 | * 封榜倒计时分钟数 23 | * 信息可见性(分为赛时可见性、赛后可见性),主要有 4 类: 24 | * 他人提交是否可感知 25 | * 榜单是否可见 26 | * 百分值成绩是否可见 27 | * 每个测试点成绩是否可见 28 | 29 | ![img](/img/home/image-20201122212903607.png) 30 | 31 | ![img](/img/home/image-20201122212835905.png) 32 | 33 | 34 | 35 | ## 比赛题目修改 36 | 37 | 题目列表,主要有: 38 | 39 | * 题目编码 40 | * 题目别名 41 | * 题目题面。这意味着可以特地在题库里面添加一个特有的题面,只在某场比赛里面使用 42 | * 题目权重 43 | * 气球颜色(非线下赛可不置颜色) 44 | 45 | 点击题目表格第一行最左边的绿色 `+` 键,即可添加新题目。 46 | 47 | 点击题目表格每一行最左边的红色 `-` 键,即可删除该行题目。 48 | 49 | 对于新加的题目可以动态编辑 `题目编码` 输入框,输入框失去焦点后,系统会自动判断该题是否为题库中的题目,如果不是,则会在该行最后一列「合法」处显示红色叉叉,否则显示绿色的勾。 50 | 51 | 另外,每一个题目都支持题面切换以及该题目在比赛总分中所占的权重,其中权重默认为 1。 52 | 53 | ![img](/img/manager-manual/image-20201205231615733.png) 54 | -------------------------------------------------------------------------------- /website/docs/manual/manager/judgetemplate.md: -------------------------------------------------------------------------------- 1 | # 评测模板管理 2 | 3 | 评测模板分成 `IO`、`SPJ`、`Advanced` 三种类型。 4 | 5 | `IO`:适用于输入输出型题目的评测 6 | 7 | `SPJ`:适用于 Special Judge 型题目的评测,即一道题目可能有多解,需要一个单独的程序来对答案判正确性 8 | 9 | `Advanced`:适用于进阶模式型题目的评测。是更强大的评测能力,让出题方来定义如何评测一份代码/一些文件 10 | 11 | 本章中将会描述一下,评测模板的业务,以及如何制作、测试、添加评测模板。 12 | 13 | ## 评测模板列表 14 | 15 | ![img](/img/manager-manual/image-20201206232355529.png) 16 | 17 | 操作栏右边有 `Edit` 和 `Fork`。 18 | 19 | ## IO 类型 20 | 21 | IO 即 `input/output`,即通过标准输入输出,将测试数据作为标准输入流输入到用户程序,用户程序的标准输出流的输出和标准答案进行比对,根据用户程序运行时状态和运行后结果,来评价用户程序的正确性和性能。 22 | 23 | SDUOJ 中,添加一个 IO 类型的评测模板,意味着多增加一种 "评测语言" 的配置。 24 | 25 | 下图是评测 C++11 程序的评测模板配置: 26 | 27 | ![img](/img/manager-manual/image-20201206232822984.png) 28 | 29 | 其中,Script 约定为一个 JSON 串。格式及其解释: 30 | 31 | ```json 32 | { 33 | "user":{ // user 即定义对用户程序的操作 34 | "compile":{ // 编译操作和配置 35 | "srcName": "代码存到哪个文件名", // NotNull 36 | "maxCpuTime": 1000, // 最大CPU执行时间,NotNull 37 | "maxRealTime": 2000, // 最大真实执行时间=CPU执行时间+IO执行时间,不定义时取 maxCpuTime 38 | "maxMemory": 262144, // 最大内存 39 | "commands": [ // 大于0条的 shell 命令 40 | "..." 41 | ] 42 | }, 43 | "run":{ // 运行操作和配置 44 | "command": "...", // 要运行的 shell 命令, NotNull 45 | "seccompRule": "general", // 安全沙箱规则 46 | "maxCpuTimeFactor": 1, // 最大CPU执行时间倍率,评测时限制值=题目设置的时间限制*倍率,不定义时取1 47 | "maxRealTimeFactor": 1, // 最大真实执行时间倍率,评测时限制值=题目设置的时间限制*倍率,不定义时取1 48 | "maxMemoryFactor": 1, // 最大内存倍率,评测时限制值=题目设置的内存限制*倍率,不定义时取1 49 | "envs": [ // 环境变量,可不定义 50 | "..." 51 | ] 52 | } 53 | } 54 | } 55 | ``` 56 | 57 | * C++11 的评测模板样例如下: 58 | 59 | ```json 60 | { 61 | "user":{ 62 | "compile":{ 63 | "srcName":"solution.cc", 64 | "maxCpuTime":3000, 65 | "maxRealTime":5000, 66 | "maxMemory":262144, 67 | "commands":[ 68 | "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++11 solution.cc -lm -o solution" 69 | ] 70 | }, 71 | "run":{ 72 | "command":"solution", 73 | "seccompRules":"c_cpp" 74 | } 75 | } 76 | } 77 | ``` 78 | 79 | * Python3 的评测模板样例如下: 80 | 81 | ```json 82 | { 83 | "user":{ 84 | "compile":{ 85 | "srcName":"solution.py", 86 | "maxCpuTime":3000, 87 | "maxRealTime":5000, 88 | "maxMemory":262144, 89 | "commands":[ 90 | "/usr/bin/python3 -m py_compile solution.py" 91 | ] 92 | }, 93 | "run":{ 94 | "command":"/usr/bin/python3 __pycache__/solution.cpython-36.pyc", 95 | "seccompRules":"general", 96 | "maxRealTimeFactor":2, 97 | "maxCpuTimeFactor":2 98 | } 99 | } 100 | } 101 | ``` 102 | 103 | * Python2 的评测模板样例如下: 104 | 105 | ```json 106 | { 107 | "user":{ 108 | "compile":{ 109 | "srcName":"solution.py", 110 | "maxCpuTime":3000, 111 | "maxRealTime":5000, 112 | "maxMemory":262144, 113 | "commands":[ 114 | "/usr/bin/python -m py_compile solution.py" 115 | ] 116 | }, 117 | "run":{ 118 | "command":"/usr/bin/python solution.pyc", 119 | "seccompRules":"general", 120 | "maxRealTimeFactor":2, 121 | "maxCpuTimeFactor":2 122 | } 123 | } 124 | } 125 | ``` 126 | 127 | * Java8 的评测模板样例如下: 128 | 129 | ```json 130 | { 131 | "user":{ 132 | "compile":{ 133 | "srcName":"Main.java", 134 | "maxCpuTime":3000, 135 | "maxRealTime":5000, 136 | "maxMemory":0, 137 | "commands":[ 138 | "/usr/bin/javac Main.java -encoding UTF8" 139 | ] 140 | }, 141 | "run":{ 142 | "command":"/usr/bin/java -XX:MaxRAM={problemMemoryLimit}k -Djava.security.manager -Djava.awt.headless=true Main", 143 | "seccompRules":"general", 144 | "maxMemoryFactor":0, 145 | "maxCpuTimeFactor":2, 146 | "maxRealTimeFactor":2 147 | } 148 | } 149 | } 150 | ``` 151 | 152 | ## SPJ 类型 153 | 154 | spj 即 Special Judge,对于一些有多解的题目,需要一个单独的程序来对答案判正确性。 155 | 156 | ```json 157 | { 158 | "user":{ // user 即定义对用户程序的操作 159 | // 与 IO 类型评测模板内定义是相同的 160 | }, 161 | "spj":{ // spj 即定义对 spj 程序的操作 162 | "compile":{ // 编译操作和配置 163 | "srcName": "代码存到哪个文件名", // NotNull 164 | "maxCpuTime": 1000, // 最大CPU执行时间,NotNull 165 | "maxRealTime": 2000, // 最大真实执行时间=CPU执行时间+IO执行时间,不定义时取 maxCpuTime 166 | "maxMemory": 262144, // 最大内存 167 | "commands": [ // 大于0条的 shell 命令 168 | "..." 169 | ] 170 | }, 171 | "run":{ // 运行操作和配置 172 | "command": "...", // 要运行的 shell 命令, NotNull 173 | "seccompRule": "general", // 安全沙箱规则 174 | "maxCpuTimeFactor": 1, // 最大CPU执行时间倍率,评测时限制值=题目设置的时间限制*倍率,不定义时取1 175 | "maxRealTimeFactor": 1, // 最大真实执行时间倍率,评测时限制值=题目设置的时间限制*倍率,不定义时取1 176 | "maxMemoryFactor": 1, // 最大内存倍率,评测时限制值=题目设置的内存限制*倍率,不定义时取1 177 | "envs": [ // 环境变量,可不定义 178 | "..." 179 | ] 180 | } 181 | } 182 | } 183 | ``` 184 | 185 | 待写 186 | 187 | ## Advanced 类型 188 | 189 | 待写 190 | 191 | -------------------------------------------------------------------------------- /website/docs/manual/manager/problem.md: -------------------------------------------------------------------------------- 1 | # 题库管理 2 | 3 | 在题目业务上,我们支持 `选定评测模板`、 `一题多面`、`测试点和样例点管理` 等特性。 4 | 5 | `选定评测模板`:指定一些题目的评测模板,用户只能选定这些评测模板对其代码进行评测! 6 | 7 | `一题多面`:同一道题目,可有多个题面!可支持中文、英文、俄文等多语言!可支持复杂、精炼、变形题面等多形式! 8 | 9 | `测试点和样例点管理`:顺序、分值、可见性都可高度自定义! 10 | 11 | 12 | 13 | ## 题库列表 14 | 15 | ![img](/img/manager-manual/image-20201204221652364.png) 16 | 17 | ## 修改题目基本信息 18 | 19 | 点击数据表中每一行右边的 `edit`,即可修改题目的基本信息。 20 | 21 | ![img](/img/manager-manual/image-20201204221734955.png) 22 | 23 | ## 添加题目 24 | 25 | 点击数据表左下角的 `add` 按钮,即可动态添加题目。 26 | 27 | ![img](/img/manager-manual/image-20201204221830240.png) 28 | 29 | ## 删除题目 30 | 31 | 选中数据表第一列的单选框,即可删除选中的题目。 32 | 33 | ## 标签管理(重构中) 34 | 35 | 点击数据表左下角的 `标签管理`,即可动态管理 OJ 所支持的题目标签。 36 | 37 | 38 | ## 题面列表&修改基础信息 39 | 40 | 在题库列表点击`Description`,即可查看该题目的题面列表。 41 | 42 | ![img](/img/manager-manual/image-20201204222030825.png) 43 | 44 | * 切换为默认题面:将 Default 对应的开关打开即可设置对应的题面为该题的默认题面 45 | * 公开该题面:将 Public 对应的开关打开即可公开该题面 46 | 47 | * 更改题面的 Title:点击具体的 Title 字段,则可以直接修改题面的 Title 48 | 49 | ## 题面详情 50 | 51 | 点击题面的 `edit`,可出现题面详情。其分为两个文本框和一个工具栏,左边的输入框,输入 markdown & HTML 格式的源数据,右边为展示框,显示源数据实时渲染后的结果,具体页面如下所示: 52 | 53 | ![img](/img/manager-manual/image-20201204222206973.png) 54 | 55 | 点击上图右下角的 `OK` 即可保存题面。 56 | 57 | ## 测试点列表 58 | 59 | 在题库列表点击 `Description`,即可查看该题目的测试点列表。 60 | 61 | ![img](/img/manager-manual/image-20201204222800604.png) 62 | 63 | ## 测试点上传 64 | 65 | 点击第一个表格左下角的 `Uploads` 按钮,即可实现测试点的上传,并且支持批量文件上传。 66 | 67 | ![img](/img/manager-manual/image-20201204222911487.png) 68 | 69 | ## 样例点构造 70 | 71 | 点击第二个表格中每行最右边的 `+` 号,即可将该测试点设置为样例。 72 | 73 | ![img](/img/manager-manual/image-20201204223004581.png) 74 | 75 | 点击第一个表格中每行最右边的 `-` 号,即可将该测试点移除。 76 | 77 | ## 顺序调整 78 | 79 | 样例和测试点的顺序都可通过右边的 `↑` 和 `↓` 进行调整。 80 | 81 | ## 测试点删除 82 | 83 | 第二个表格中每一行最右边的红色按钮即为删除按钮,支持单点删除测试点。 84 | 85 | ![img](/img/manager-manual/image-20201204223028716.png) 86 | 87 | 另外,也可以点击每一行最左边的复选框,再点击左下方的`Batch Delete`红色按钮,即可实现测试点的批量删除。 88 | 89 | ![img](/img/manager-manual/image-20201204223046228.png) 90 | 91 | ## 测试点下载 92 | 93 | 可以点击每一行最左边的复选框,再点击左下方的 `Batch download` 按钮,即可实现测试点的批量下载。 94 | 95 | ![img](/img/manager-manual/image-20201204223220106.png) 96 | 97 | ## 测试点保存 98 | 99 | 离开页面时可以点击页面右上角的 `Save` 按钮,用于保存所有测试点及其顺序。 100 | 101 | ![img](/img/manager-manual/image-20201204223239414.png) 102 | 103 | 如果离开时测试点状态已更改,但并未保存,则系统会提示是否需要保存测试点,具体提示弹框如下: 104 | 105 | (缺个图) 106 | -------------------------------------------------------------------------------- /website/docs/manual/manager/user.md: -------------------------------------------------------------------------------- 1 | # 用户管理 2 | 3 | ## 页面入口 4 | 5 | ![image](/img/manager-manual/image-20201201233733717.png) 6 | 7 | ## 修改用户基本信息 8 | 9 | 点击 `Edit`,即可弹出一个模态框,用于动态修改用户的基本信息。 10 | 11 | ![image](/img/manager-manual/image-20201201233817834.png) 12 | 13 | ## 修改用户密码 14 | 15 | 点击 `Password`,即可弹出一个模态框,用于动态修改用户的密码。 16 | 17 | ![image](/img/manager-manual/image-20201201233915688.png) 18 | 19 | ## 添加新用户 20 | 21 | 点击表格左下角的 `ADD` 按钮,即可弹出一个模态框,用于添加新用户。其中有红点标注的字段为必填字段。 22 | 23 | ![image](/img/manager-manual/image-20201201234006454.png) 24 | 25 | ## 删除用户 26 | 27 | 选中表格第一列的单选框,即可选择性地删除用户。 28 | 29 | ![image](/img/manager-manual/image-20201201234049167.png) 30 | 31 | ## 批量导入用户 32 | 33 | 点击左下角的「Import」按钮,即可批量导入用户,导入格式见下述截图。 34 | 35 | ![image](/img/manager-manual/image-20201201234123922.png) 36 | 37 | ![image](/img/manager-manual/image-20201201234357191.png) 38 | 39 | 随后将 excel 表格文件拖拽入上传框。 40 | 41 | ![image](/img/manager-manual/image-20201201234438802.png) 42 | 43 | 点击 OK,即可批量导入用户。 44 | 45 | ## 文件导出 46 | 47 | 选中表格第一列的单选框,即可选择性地导出用户信息。 48 | 49 | ![image](/img/manager-manual/image-20201201234512472.png) -------------------------------------------------------------------------------- /website/docs/manual/user/contest.md: -------------------------------------------------------------------------------- 1 | # 比赛相关 2 | 3 | 点击导航栏上的「Contest」区域,即可进入 OJ 的比赛页面,如下所示即为比赛首页部分。 4 | 5 | ![img](/img/user-manual/160467098889.jpg) 6 | 7 | ## 比赛表格 8 | 9 | 比赛表格按顺序展示 OJ 上的所有比赛,每一行分别展示比赛时间、比赛类型、比赛标题以及当前用户是否参加过该比赛。其中比赛的开放模式分为三种:私有、公开、保护,分别对应着红色锁、橙色锁以及没有锁。 10 | 11 | ![img](/img/user-manual/160467098939.jpg) 12 | 13 | 另外,比赛列表第一行右边的下拉框可以筛选不同类型的比赛,具体效果如下所示: 14 | 15 | ![img](/img/user-manual/160467098981.jpg) 16 | 17 | ## 近期比赛 18 | 19 | 除此之外,比赛首页右边的「Upcoming」框显示近期即将开始的比赛,以及其对应的倒计时。 20 | 21 | ![img](/img/user-manual/160467099027.jpg) 22 | 23 | ## 比赛详情 24 | 25 | 点击比赛标题,即可进入比赛的详情页,具体页面布局如下所示: 26 | 27 | ![img](/img/user-manual/160467099073.jpg) 28 | 29 | 其中详情页最上方为比赛的基础信息,包括比赛标题、比赛来源、比赛类型、比赛开始时间、比赛时长。 30 | 31 | 基础信息之后的导航栏分为四个部分,分别是「题目概览」、「题目详情页」、「评测状态」、「比赛榜单」。 32 | 33 | ## 题目概览 34 | 35 | 「Overview」页面用表格的形式展示比赛中的所有题目,其中一共有 4 列,分别是编号、题目标题、题目通过总数 / 提交总数以及当前用户的该题状态。 36 | 37 | ![img](/img/user-manual/160467099188.jpg) 38 | 39 | ## 题目预览 40 | 41 | 点击比赛导航栏中的「Problem」,即可进入题目详情页,如下所示: 42 | 43 | ![img](/img/user-manual/160467099274.jpg) 44 | 45 | 其中详情页的左边部分与题库的题目提交类似,分别展示题面以及代码提交框。 46 | 47 | ![img](/img/user-manual/160467099325.jpg) 48 | 49 | 详情页的右边页面分别是快速切题框、题目基本信息框以及本场比赛所有题目的提交状态。 50 | 51 | ![img](/img/user-manual/160467099373.jpg) 52 | 53 | ## 提交状态 54 | 55 | 点击比赛导航栏上的「Status」即可进入比赛的提交页面,显示所有参赛者在所有题上的提交状态,并支持按照用户、题目、评测结果以及语言进行搜索以及根据评测时间、评测内存进行排序。 56 | 57 | ![img](/img/user-manual/160467099416.jpg) 58 | 59 | ## 比赛榜单 60 | 61 | 点击比赛导航栏上的「Rank」即可进入比赛的榜单页面,显示当前所有参赛者的过题数、罚时以及排名。 62 | 63 | ![img](/img/user-manual/160467099466.jpg) 64 | 65 | 比赛榜单页面中的时间轴可以动态进行拉动,显示比赛每一个时间点下的排名状态。 66 | -------------------------------------------------------------------------------- /website/docs/manual/user/home.md: -------------------------------------------------------------------------------- 1 | # 主页 2 | 3 | 主页用轮播图展示最新事件。在轮播图下方有两个显示框,分别显示最近的公告以及搜索框。 4 | 5 | ![img](/img/user-manual/160467098269.jpg) 6 | 7 | 另外,主页的导航栏由五部分组成,从左到右分别是「主页」、「题库」、「比赛」、「提交」、「个人」。可以点击具体的入口进入指定页面。 -------------------------------------------------------------------------------- /website/docs/manual/user/problem.md: -------------------------------------------------------------------------------- 1 | # 题目相关 2 | 3 | ## 题库表格 4 | 5 | 题库表格展示 OJ 中所有的题目,其中可以按题目通过数对所有题目进行排序。另外,标题后方打上勾的题目为当前登陆用户已经完成的题目。 6 | 7 | ![img](/img/user-manual/160467098321.jpg) 8 | 9 | 点击题库表格右上角的标签按钮,即可以显示题库中的每道题的标签,目前每道题还没分配标签。 10 | 11 | ![img](/img/user-manual/160467098391.jpg) 12 | 13 | ## 标签分类 14 | 15 | 题库首页右边的分类框,显示 OJ 中所有的大类标签,触摸每一个大类标签,即可显示其对应的子标签。 16 | 17 | ![img](/img/user-manual/160467098448.jpg) 18 | 19 | ## 交题页面 20 | 21 | 点击题库表格中每行的标题,即可进入该题所对应的交题页面。 22 | 23 | ![img](/img/user-manual/160467098495.jpg) 24 | 25 | ![img](/img/user-manual/160467098555.jpg) 26 | 27 | ## 题目信息 28 | 29 | 在交题页面中,「Description」框为题面描述,「Details」框为题目基本信息,「Descriptions」框为该题不同版本的题面,「Recent Submissions」为该用户在该题最近几次的提交,其中点击「show all submissions」即进入「submission」页面,展示该用户在此题上的所有历史提交。 30 | 31 | ![img](/img/user-manual/160467098653.jpg) 32 | 33 | ## 代码提交 34 | 35 | 题面描述框下方为代码输入框,其中代码输入框第一行左边为评测语言选择,如下图所示: 36 | 37 | ![img](/img/user-manual/160467098700.jpg) 38 | 39 | 代码输入框第一行右边为上传代码的按钮,可以直接上传代码。 40 | 41 | ![img](/img/user-manual/160467098741.jpg) 42 | 43 | 也可以直接使用代码输入框进行代码提交,如下图所示: 44 | 45 | ![img](/img/user-manual/160467098779.jpg) 46 | 47 | ## 题目评测 48 | 49 | 提交后,代码就会被交由评测机进行评测,并将评测机的结果返回给前端。如下图所示,此题一共有 20 个数据题,并展示了该代码在每一个数据点上的评测结果、用时以及内存消耗。 50 | 51 | 页面右边为当次提交的具体信息,其中包括提交时间、提交用户、评测结果、总耗时、总占用空间、评测语言、代码长度等信息。 52 | 53 | 另外,页面最底下用代码高亮文本框展示了提交后的代码,顺利完成题库基本功能。 54 | 55 | ![img](/img/user-manual/160467098836.jpg) 56 | -------------------------------------------------------------------------------- /website/docs/manual/user/submission.md: -------------------------------------------------------------------------------- 1 | # 评测相关 2 | 3 | ## 评测页面 4 | 5 | 点击导航栏中的「Submission」,即可进入评测页面,展示当前 OJ 中所有的历史提交记录。 6 | 7 | ![img](/img/user-manual/160467099522.jpg) 8 | 9 | ## 评测搜索框 10 | 11 | 类似于比赛中的评测框,当前页面的评测框展示所有人在所有题目上的提交,支持通过用户、题目、评测结果、语言类型进行检索,并支持根据代码运行时间、占用内存对评测结果进行排序。 12 | 13 | ![img](/img/user-manual/160467099571.jpg) -------------------------------------------------------------------------------- /website/docs/manual/user/user.md: -------------------------------------------------------------------------------- 1 | # 用户相关 2 | 3 | ## 注册 4 | 5 | 点击导航栏中的「Register」按钮即可进入用户注册页面,具体页面如下所示: 6 | 7 | ![img](/img/user-manual/160467099616.jpg) 8 | 9 | 填写用户注册所需数据字段即可顺利完成注册。 10 | 11 | ## 登陆 12 | 13 | 注册完后会进入用户登陆页面,如下所示: 14 | 15 | ![img](/img/user-manual/160467099715.jpg) 16 | 17 | 准确输入账号名、密码即可顺利登陆。 18 | 19 | ## 登出 20 | 21 | 鼠标触摸导航栏的用户名,即可弹出一个下拉框,点击「Logout」即可完成账号登出。 22 | 23 | ![img](/img/user-manual/160467099865.jpg) 24 | 25 | ## 基本信息 26 | 27 | 鼠标触摸导航栏的用户名,即可弹出一个下拉框,点击「Profile」即可查看账号基本信息。 28 | 29 | ![img](/img/user-manual/160467099938.jpg) 30 | 31 | 点击「Profile」进入用户基本信息页面,如下所示: 32 | 33 | ![img](/img/user-manual/160467099994.jpg) 34 | 35 | 基本信息分为四大部分,首先是「Your Profile」输入框,其中包括了该用户的各个基本信息,准确填写并正确输入用户密码即可完成基本信息的修改。 36 | 37 | ![img](/img/user-manual/160467100047.jpg) 38 | 39 | 其次是「Change Your Password」输入框,首先需要输入旧密码验证身份,然后再输入新密码以及确认密码即可完成密码的修改。 40 | 41 | ![img](/img/user-manual/160467100089.jpg) 42 | 43 | 接下来是「Change Your Email」框,依然是先输入密码验证身份,再输入修改后的邮箱来更改用户邮箱。 44 | 45 | ![img](/img/user-manual/160467100118.jpg) 46 | 47 | 最后是「User Practice Statistics」框,依次展示了用户头像、用户提交数、用户完成的题目数以及用户提交了但还未完成的题目数。 48 | 49 | ![img](/img/user-manual/160467100147.jpg) 50 | -------------------------------------------------------------------------------- /website/docusaurus.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Note: type annotations allow type checking and IDEs autocompletion 3 | 4 | const lightCodeTheme = require("prism-react-renderer/themes/github"); 5 | const darkCodeTheme = require("prism-react-renderer/themes/dracula"); 6 | 7 | /** @type {import('@docusaurus/types').Config} */ 8 | const config = { 9 | title: "SDUOJ 开源在线评测系统", 10 | tagline: "SDUOJ", 11 | favicon: "img/sduoj-logo.svg", 12 | 13 | // Set the production url of your site here 14 | url: "https://docs.sduoj.com", 15 | // Set the // pathname under which your site is served 16 | // For GitHub pages deployment, it is often '//' 17 | baseUrl: "/", 18 | 19 | // GitHub pages deployment config. 20 | // If you aren't using GitHub pages, you don't need these. 21 | organizationName: "sduoj", // Usually your GitHub org/user name. 22 | projectName: "OnlineJudge", // Usually your repo name. 23 | 24 | onBrokenLinks: "throw", 25 | onBrokenMarkdownLinks: "warn", 26 | 27 | // Even if you don't use internalization, you can use this field to set useful 28 | // metadata like html lang. For example, if your site is Chinese, you may want 29 | // to replace "en" with "zh-Hans". 30 | i18n: { 31 | defaultLocale: "zh", 32 | locales: ["zh", "en"], 33 | path: "i18n", 34 | localeConfigs: { 35 | zh: { 36 | label: "简体中文", 37 | }, 38 | en: { 39 | label: "English", 40 | }, 41 | }, 42 | }, 43 | 44 | presets: [ 45 | [ 46 | "classic", 47 | /** @type {import('@docusaurus/preset-classic').Options} */ 48 | ({ 49 | docs: { 50 | sidebarPath: require.resolve("./sidebars.js"), 51 | // Please change this to your repo. 52 | // Remove this to remove the "edit this page" links. 53 | editUrl: 54 | "https://github.com/sduoj/OnlineJudge/tree/main/website/", 55 | }, 56 | blog: { 57 | showReadingTime: true, 58 | // Please change this to your repo. 59 | // Remove this to remove the "edit this page" links. 60 | editUrl: 61 | "https://github.com/sduoj/OnlineJudge/tree/main/website/", 62 | }, 63 | theme: { 64 | customCss: require.resolve("./src/css/custom.css"), 65 | }, 66 | }), 67 | ], 68 | ], 69 | 70 | themeConfig: 71 | /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ 72 | ({ 73 | // Replace with your project's social card 74 | image: "img/sduoj-logo.svg", 75 | navbar: { 76 | title: "SDUOJ", 77 | logo: { 78 | alt: "SDUOJ Logo", 79 | src: "img/sduoj-logo.svg", 80 | }, 81 | items: [ 82 | { 83 | type: "docSidebar", 84 | sidebarId: "manualSidebar", 85 | position: "left", 86 | label: "使用指南", 87 | }, 88 | { 89 | type: "docSidebar", 90 | sidebarId: "deploymentSidebar", 91 | position: "left", 92 | label: "部署指南", 93 | }, 94 | { 95 | href: "https://github.com/sduoj/OnlineJudge", 96 | className: "header-github-link", 97 | "aria-label": "GitHub repository", 98 | position: "right", 99 | }, 100 | { 101 | type: "localeDropdown", 102 | position: "right", 103 | }, 104 | ], 105 | }, 106 | footer: { 107 | style: "dark", 108 | links: [], 109 | copyright: `GNU Affero General Public License v3.0 | Copyright © 2020-${new Date().getFullYear()} SDUOJ Team. All Rights Reserved.`, 110 | }, 111 | prism: { 112 | theme: lightCodeTheme, 113 | darkTheme: darkCodeTheme, 114 | }, 115 | }), 116 | }; 117 | 118 | module.exports = config; 119 | -------------------------------------------------------------------------------- /website/i18n/en/code.json: -------------------------------------------------------------------------------- 1 | { 2 | "theme.ErrorPageContent.title": { 3 | "message": "This page crashed.", 4 | "description": "The title of the fallback page when the page crashed" 5 | }, 6 | "theme.NotFound.title": { 7 | "message": "Page Not Found", 8 | "description": "The title of the 404 page" 9 | }, 10 | "theme.NotFound.p1": { 11 | "message": "We could not find what you were looking for.", 12 | "description": "The first paragraph of the 404 page" 13 | }, 14 | "theme.NotFound.p2": { 15 | "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", 16 | "description": "The 2nd paragraph of the 404 page" 17 | }, 18 | "theme.BackToTopButton.buttonAriaLabel": { 19 | "message": "Scroll back to top", 20 | "description": "The ARIA label for the back to top button" 21 | }, 22 | "theme.blog.archive.title": { 23 | "message": "Archive", 24 | "description": "The page & hero title of the blog archive page" 25 | }, 26 | "theme.blog.archive.description": { 27 | "message": "Archive", 28 | "description": "The page & hero description of the blog archive page" 29 | }, 30 | "theme.admonition.note": { 31 | "message": "note", 32 | "description": "The default label used for the Note admonition (:::note)" 33 | }, 34 | "theme.admonition.tip": { 35 | "message": "tip", 36 | "description": "The default label used for the Tip admonition (:::tip)" 37 | }, 38 | "theme.admonition.danger": { 39 | "message": "danger", 40 | "description": "The default label used for the Danger admonition (:::danger)" 41 | }, 42 | "theme.admonition.info": { 43 | "message": "info", 44 | "description": "The default label used for the Info admonition (:::info)" 45 | }, 46 | "theme.admonition.caution": { 47 | "message": "caution", 48 | "description": "The default label used for the Caution admonition (:::caution)" 49 | }, 50 | "theme.blog.paginator.navAriaLabel": { 51 | "message": "Blog list page navigation", 52 | "description": "The ARIA label for the blog pagination" 53 | }, 54 | "theme.blog.paginator.newerEntries": { 55 | "message": "Newer Entries", 56 | "description": "The label used to navigate to the newer blog posts page (previous page)" 57 | }, 58 | "theme.blog.paginator.olderEntries": { 59 | "message": "Older Entries", 60 | "description": "The label used to navigate to the older blog posts page (next page)" 61 | }, 62 | "theme.blog.post.paginator.navAriaLabel": { 63 | "message": "Blog post page navigation", 64 | "description": "The ARIA label for the blog posts pagination" 65 | }, 66 | "theme.blog.post.paginator.newerPost": { 67 | "message": "Newer Post", 68 | "description": "The blog post button label to navigate to the newer/previous post" 69 | }, 70 | "theme.blog.post.paginator.olderPost": { 71 | "message": "Older Post", 72 | "description": "The blog post button label to navigate to the older/next post" 73 | }, 74 | "theme.blog.post.plurals": { 75 | "message": "One post|{count} posts", 76 | "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" 77 | }, 78 | "theme.blog.tagTitle": { 79 | "message": "{nPosts} tagged with \"{tagName}\"", 80 | "description": "The title of the page for a blog tag" 81 | }, 82 | "theme.tags.tagsPageLink": { 83 | "message": "View All Tags", 84 | "description": "The label of the link targeting the tag list page" 85 | }, 86 | "theme.colorToggle.ariaLabel": { 87 | "message": "Switch between dark and light mode (currently {mode})", 88 | "description": "The ARIA label for the navbar color mode toggle" 89 | }, 90 | "theme.colorToggle.ariaLabel.mode.dark": { 91 | "message": "dark mode", 92 | "description": "The name for the dark color mode" 93 | }, 94 | "theme.colorToggle.ariaLabel.mode.light": { 95 | "message": "light mode", 96 | "description": "The name for the light color mode" 97 | }, 98 | "theme.docs.breadcrumbs.navAriaLabel": { 99 | "message": "Breadcrumbs", 100 | "description": "The ARIA label for the breadcrumbs" 101 | }, 102 | "theme.docs.DocCard.categoryDescription": { 103 | "message": "{count} items", 104 | "description": "The default description for a category card in the generated index about how many items this category includes" 105 | }, 106 | "theme.docs.paginator.navAriaLabel": { 107 | "message": "Docs pages", 108 | "description": "The ARIA label for the docs pagination" 109 | }, 110 | "theme.docs.paginator.previous": { 111 | "message": "Previous", 112 | "description": "The label used to navigate to the previous doc" 113 | }, 114 | "theme.docs.paginator.next": { 115 | "message": "Next", 116 | "description": "The label used to navigate to the next doc" 117 | }, 118 | "theme.docs.tagDocListPageTitle.nDocsTagged": { 119 | "message": "One doc tagged|{count} docs tagged", 120 | "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" 121 | }, 122 | "theme.docs.tagDocListPageTitle": { 123 | "message": "{nDocsTagged} with \"{tagName}\"", 124 | "description": "The title of the page for a docs tag" 125 | }, 126 | "theme.docs.versionBadge.label": { 127 | "message": "Version: {versionLabel}" 128 | }, 129 | "theme.docs.versions.unreleasedVersionLabel": { 130 | "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", 131 | "description": "The label used to tell the user that he's browsing an unreleased doc version" 132 | }, 133 | "theme.docs.versions.unmaintainedVersionLabel": { 134 | "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", 135 | "description": "The label used to tell the user that he's browsing an unmaintained doc version" 136 | }, 137 | "theme.docs.versions.latestVersionSuggestionLabel": { 138 | "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", 139 | "description": "The label used to tell the user to check the latest version" 140 | }, 141 | "theme.docs.versions.latestVersionLinkLabel": { 142 | "message": "latest version", 143 | "description": "The label used for the latest version suggestion link label" 144 | }, 145 | "theme.common.editThisPage": { 146 | "message": "Edit this page", 147 | "description": "The link label to edit the current page" 148 | }, 149 | "theme.common.headingLinkTitle": { 150 | "message": "Direct link to {heading}", 151 | "description": "Title for link to heading" 152 | }, 153 | "theme.lastUpdated.atDate": { 154 | "message": " on {date}", 155 | "description": "The words used to describe on which date a page has been last updated" 156 | }, 157 | "theme.lastUpdated.byUser": { 158 | "message": " by {user}", 159 | "description": "The words used to describe by who the page has been last updated" 160 | }, 161 | "theme.lastUpdated.lastUpdatedAtBy": { 162 | "message": "Last updated{atDate}{byUser}", 163 | "description": "The sentence used to display when a page has been last updated, and by who" 164 | }, 165 | "theme.navbar.mobileVersionsDropdown.label": { 166 | "message": "Versions", 167 | "description": "The label for the navbar versions dropdown on mobile view" 168 | }, 169 | "theme.tags.tagsListLabel": { 170 | "message": "Tags:", 171 | "description": "The label alongside a tag list" 172 | }, 173 | "theme.AnnouncementBar.closeButtonAriaLabel": { 174 | "message": "Close", 175 | "description": "The ARIA label for close button of announcement bar" 176 | }, 177 | "theme.blog.sidebar.navAriaLabel": { 178 | "message": "Blog recent posts navigation", 179 | "description": "The ARIA label for recent posts in the blog sidebar" 180 | }, 181 | "theme.CodeBlock.copied": { 182 | "message": "Copied", 183 | "description": "The copied button label on code blocks" 184 | }, 185 | "theme.CodeBlock.copyButtonAriaLabel": { 186 | "message": "Copy code to clipboard", 187 | "description": "The ARIA label for copy code blocks button" 188 | }, 189 | "theme.CodeBlock.copy": { 190 | "message": "Copy", 191 | "description": "The copy button label on code blocks" 192 | }, 193 | "theme.CodeBlock.wordWrapToggle": { 194 | "message": "Toggle word wrap", 195 | "description": "The title attribute for toggle word wrapping button of code block lines" 196 | }, 197 | "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { 198 | "message": "Toggle the collapsible sidebar category '{label}'", 199 | "description": "The ARIA label to toggle the collapsible sidebar category" 200 | }, 201 | "theme.NavBar.navAriaLabel": { 202 | "message": "Main", 203 | "description": "The ARIA label for the main navigation" 204 | }, 205 | "theme.navbar.mobileLanguageDropdown.label": { 206 | "message": "Languages", 207 | "description": "The label for the mobile language switcher dropdown" 208 | }, 209 | "theme.TOCCollapsible.toggleButtonLabel": { 210 | "message": "On this page", 211 | "description": "The label used by the button on the collapsible TOC component" 212 | }, 213 | "theme.blog.post.readMore": { 214 | "message": "Read More", 215 | "description": "The label used in blog post item excerpts to link to full blog posts" 216 | }, 217 | "theme.blog.post.readMoreLabel": { 218 | "message": "Read more about {title}", 219 | "description": "The ARIA label for the link to full blog posts from excerpts" 220 | }, 221 | "theme.blog.post.readingTime.plurals": { 222 | "message": "One min read|{readingTime} min read", 223 | "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" 224 | }, 225 | "theme.docs.breadcrumbs.home": { 226 | "message": "Home page", 227 | "description": "The ARIA label for the home page in the breadcrumbs" 228 | }, 229 | "theme.docs.sidebar.collapseButtonTitle": { 230 | "message": "Collapse sidebar", 231 | "description": "The title attribute for collapse button of doc sidebar" 232 | }, 233 | "theme.docs.sidebar.collapseButtonAriaLabel": { 234 | "message": "Collapse sidebar", 235 | "description": "The title attribute for collapse button of doc sidebar" 236 | }, 237 | "theme.docs.sidebar.navAriaLabel": { 238 | "message": "Docs sidebar", 239 | "description": "The ARIA label for the sidebar navigation" 240 | }, 241 | "theme.docs.sidebar.closeSidebarButtonAriaLabel": { 242 | "message": "Close navigation bar", 243 | "description": "The ARIA label for close button of mobile sidebar" 244 | }, 245 | "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { 246 | "message": "← Back to main menu", 247 | "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" 248 | }, 249 | "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { 250 | "message": "Toggle navigation bar", 251 | "description": "The ARIA label for hamburger menu button of mobile navigation" 252 | }, 253 | "theme.docs.sidebar.expandButtonTitle": { 254 | "message": "Expand sidebar", 255 | "description": "The ARIA label and title attribute for expand button of doc sidebar" 256 | }, 257 | "theme.docs.sidebar.expandButtonAriaLabel": { 258 | "message": "Expand sidebar", 259 | "description": "The ARIA label and title attribute for expand button of doc sidebar" 260 | }, 261 | "theme.ErrorPageContent.tryAgain": { 262 | "message": "Try again", 263 | "description": "The label of the button to try again rendering when the React error boundary captures an error" 264 | }, 265 | "theme.common.skipToMainContent": { 266 | "message": "Skip to main content", 267 | "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" 268 | }, 269 | "theme.tags.tagsPageTitle": { 270 | "message": "Tags", 271 | "description": "The title of the tag list page" 272 | }, 273 | "home.oss-oj": { 274 | "message": "Open-source Online Judge" 275 | }, 276 | "home.please-star.1": { 277 | "message": "If you find this helpful or interesting," 278 | }, 279 | "home.please-star.2": { 280 | "message": "please give it a star. Thank you!" 281 | }, 282 | "home.intro-link": { 283 | "message": "https://github.com/SDUOJ/OnlineJudge/blob/main/README_EN.md" 284 | }, 285 | "home.intro": { 286 | "message": "Introduction" 287 | }, 288 | "home.manuals": { 289 | "message": "Manuals" 290 | }, 291 | "home.deployment": { 292 | "message": "Deployment" 293 | } 294 | } 295 | -------------------------------------------------------------------------------- /website/i18n/en/docusaurus-plugin-content-blog/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "Blog", 4 | "description": "The title for the blog used in SEO" 5 | }, 6 | "description": { 7 | "message": "Blog", 8 | "description": "The description for the blog used in SEO" 9 | }, 10 | "sidebar.title": { 11 | "message": "Recent posts", 12 | "description": "The label for the left sidebar" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/i18n/en/docusaurus-plugin-content-docs/current.json: -------------------------------------------------------------------------------- 1 | { 2 | "version.label": { 3 | "message": "Next", 4 | "description": "The label for version current" 5 | }, 6 | "sidebar.manualSidebar.category.用户手册": { 7 | "message": "User Manual", 8 | "description": "The label for category user-manual in sidebar manualSidebar" 9 | }, 10 | "sidebar.manualSidebar.category.管理手册": { 11 | "message": "Manager Manual", 12 | "description": "The label for category manager-manual in sidebar manualSidebar" 13 | }, 14 | "sidebar.deploymentSidebar.category.快速开始": { 15 | "message": "Quick Start", 16 | "description": "The label for category quick-start in sidebar deploymentSidebar" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /website/i18n/en/docusaurus-plugin-content-docs/current/deployment/docker-compose.mdx: -------------------------------------------------------------------------------- 1 | import Tabs from "@theme/Tabs"; 2 | import TabItem from "@theme/TabItem"; 3 | 4 | # Quick Deployment with Docker Compose 5 | 6 | ## Introduction 7 | 8 | This section only describes how to **quickly** set up an SDUOJ. It's not recommended for long-term production use. 9 | 10 | :::danger Note 11 | SDUOJ has not yet released its first stable version. For production purposes, the SDUOJ developers advise a wait-and-see attitude. 12 | ::: 13 | 14 | ## Prerequisites 15 | 16 | ### Operating System 17 | 18 | - Linux (Tested: Ubuntu 20.04, Ubuntu 22.04, Debian 10) 19 | - macOS (Tested: Ventura 13.4.1) 20 | - ~~Windows~~ (Not Supported!) 21 | 22 | ### Required Software 23 | 24 | - [git](https://git-scm.com/) 25 | - [docker](https://docs.docker.com/get-docker/): Version `23.0.2` or higher 26 | - [docker-compose-plugin](https://docs.docker.com/compose/install/linux/): Version `2.17.2` or higher 27 | 28 | You can verify using the following commands: 29 | 30 | ```shell 31 | git version 32 | docker -v 33 | docker compose version 34 | ``` 35 | 36 | ## Installing Required Software (On Ubuntu/Debian Systems) 37 | 38 | > If you already have these installed, skip this step 39 | 40 | 41 | 42 | 43 | ```shell 44 | export DOWNLOAD_URL="https://mirrors.cernet.edu.cn/docker-ce" 45 | sudo apt-get update \ 46 | && sudo apt-get install -qq -y curl git \ 47 | && curl -fsSL https://get.docker.com/ | sudo -E sh 48 | ``` 49 | 50 | 51 | 52 | 53 | ```shell 54 | sudo apt-get update \ 55 | && sudo apt-get install -qq -y curl git \ 56 | && curl -fsSL https://get.docker.com/ | sudo -E sh 57 | ``` 58 | 59 | 60 | 61 | 62 | ## All-in-One Deployment (Pseudo-Distributed) 63 | 64 | :::tip Recommended for Trial Machines 65 | 66 | - Use a pay-as-you-go model to launch a cloud server with 16G or more memory from a cloud service provider. 67 | - Install a Linux distribution on a virtual machine (Ubuntu 22.04 highly recommended). 68 | 69 | ::: 70 | 71 | If you just plan to **simply** deploy an SDUOJ to explore and try it out, follow these commands: 72 | 73 | - Clone the `sduoj-deploy` project code 74 | 75 | ```shell 76 | git clone https://github.com/SDUOJ/sduoj-deploy.git 77 | ``` 78 | 79 | - Enter the `sduoj-deploy` project directory 80 | 81 | ```shell 82 | cd sduoj-deploy 83 | ``` 84 | 85 | - Execute `docker compose` (note it's not `docker-compose`) to start the orchestrated services 86 | 87 | ```shell 88 | sudo docker compose up 89 | ``` 90 | 91 | - Access your server's IP through the URL, e.g., `http://127.0.0.1:80/` - replace `127.0.0.1` with your server's IP. 92 | 93 | Initial account details are as follows; for security reasons, please change them: 94 | 95 | - SDUOJ initial username and password are `superadmin` and `123456`, respectively. Please change. 96 | - Nacos initial username and password are both `sduoj`. Please change. 97 | - MySQL initial username and password are both `sduoj`. Please change. 98 | 99 | :::warning Note 100 | The ports for the database, message queue, and Nacos services are exposed. 101 | If deploying temporarily on a public cloud, consider setting up **network security groups** and expose only necessary ports like 22, 80, etc. 102 | Do the same on your physical server. 103 | ::: 104 | -------------------------------------------------------------------------------- /website/i18n/en/docusaurus-theme-classic/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "copyright": { 3 | "message": "GNU Affero General Public License v3.0 | Copyright © 2020-2024 SDUOJ Team. All Rights Reserved.", 4 | "description": "The footer copyright" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /website/i18n/en/docusaurus-theme-classic/navbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "SDUOJ", 4 | "description": "The title in the navbar" 5 | }, 6 | "logo.alt": { 7 | "message": "SDUOJ Logo", 8 | "description": "The alt text of navbar logo" 9 | }, 10 | "item.label.使用指南": { 11 | "message": "Manuals", 12 | "description": "Navbar item with label manuals" 13 | }, 14 | "item.label.部署指南": { 15 | "message": "Deployment", 16 | "description": "Navbar item with label deployment" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "0.0.1-SNAPSHOT", 4 | "private": true, 5 | "scripts": { 6 | "docusaurus": "cp && docusaurus", 7 | "start": "docusaurus start", 8 | "build": "docusaurus build", 9 | "swizzle": "docusaurus swizzle", 10 | "deploy": "docusaurus deploy", 11 | "clear": "docusaurus clear", 12 | "serve": "docusaurus serve", 13 | "write-translations": "docusaurus write-translations", 14 | "write-heading-ids": "docusaurus write-heading-ids", 15 | "typecheck": "tsc" 16 | }, 17 | "dependencies": { 18 | "@docusaurus/core": "^2.4.3", 19 | "@docusaurus/preset-classic": "^2.4.3", 20 | "@mdx-js/react": "^1.6.22", 21 | "clsx": "^1.2.1", 22 | "prism-react-renderer": "^1.3.5", 23 | "react": "^17.0.2", 24 | "react-dom": "^17.0.2" 25 | }, 26 | "devDependencies": { 27 | "@docusaurus/module-type-aliases": "^2.4.3", 28 | "@tsconfig/docusaurus": "^1.0.5", 29 | "typescript": "^4.7.4" 30 | }, 31 | "browserslist": { 32 | "production": [ 33 | ">0.5%", 34 | "not dead", 35 | "not op_mini all" 36 | ], 37 | "development": [ 38 | "last 1 chrome version", 39 | "last 1 firefox version", 40 | "last 1 safari version" 41 | ] 42 | }, 43 | "engines": { 44 | "node": ">=16.14" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /website/sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | // @ts-check 13 | 14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 15 | const sidebars = { 16 | // create a sidebar manually 17 | manualSidebar: [ 18 | { 19 | type: "category", 20 | label: "用户手册", 21 | link: { 22 | type: "generated-index", 23 | }, 24 | items: [ 25 | "manual/user/home", 26 | "manual/user/user", 27 | "manual/user/problem", 28 | "manual/user/submission", 29 | "manual/user/contest", 30 | ], 31 | }, 32 | { 33 | type: "category", 34 | label: "管理手册", 35 | link: { 36 | type: "generated-index", 37 | }, 38 | items: [ 39 | "manual/manager/user", 40 | "manual/manager/problem", 41 | "manual/manager/contest", 42 | "manual/manager/judgetemplate", 43 | ], 44 | }, 45 | ], 46 | deploymentSidebar: [ 47 | { 48 | type: "category", 49 | label: "快速开始", 50 | link: { 51 | type: "generated-index", 52 | }, 53 | items: ["deployment/docker-compose"], 54 | }, 55 | ], 56 | }; 57 | 58 | module.exports = sidebars; 59 | -------------------------------------------------------------------------------- /website/src/css/custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Any CSS included here will be global. The classic template 3 | * bundles Infima by default. Infima is a CSS framework designed to 4 | * work well for content-centric websites. 5 | */ 6 | 7 | /* You can override the default Infima variables here. */ 8 | :root { 9 | --ifm-color-primary: #51be8e; 10 | --ifm-color-primary-dark: #29784c; 11 | --ifm-color-primary-darker: #277148; 12 | --ifm-color-primary-darkest: #205d3b; 13 | --ifm-color-primary-light: #33925d; 14 | --ifm-color-primary-lighter: #359962; 15 | --ifm-color-primary-lightest: #3cad6e; 16 | --ifm-code-font-size: 95%; 17 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); 18 | } 19 | 20 | /* For readability concerns, you should choose a lighter palette in dark mode. */ 21 | [data-theme='dark'] { 22 | --ifm-color-primary: #25c2a0; 23 | --ifm-color-primary-dark: #21af90; 24 | --ifm-color-primary-darker: #1fa588; 25 | --ifm-color-primary-darkest: #1a8870; 26 | --ifm-color-primary-light: #29d5b0; 27 | --ifm-color-primary-lighter: #32d8b4; 28 | --ifm-color-primary-lightest: #4fddbf; 29 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); 30 | } 31 | 32 | .header-github-link:hover { 33 | opacity: 0.6; 34 | } 35 | 36 | .header-github-link::before { 37 | content: ''; 38 | width: 24px; 39 | height: 24px; 40 | display: flex; 41 | background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") 42 | no-repeat; 43 | } 44 | 45 | [data-theme='dark'] .header-github-link::before { 46 | background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") 47 | no-repeat; 48 | } 49 | -------------------------------------------------------------------------------- /website/src/mdx.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.mdx" { 2 | const content: string; 3 | export default content; 4 | } 5 | -------------------------------------------------------------------------------- /website/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | .header { 2 | text-align: center; 3 | } 4 | 5 | .header .hero { 6 | width: 20rem; 7 | } 8 | 9 | .header .description { 10 | font-size: 1.6rem; 11 | color: #6a8bad; 12 | } 13 | 14 | .header .links { 15 | margin: 1rem; 16 | gap: 1rem; 17 | justify-content: center; 18 | align-items: center; 19 | display: flex; 20 | } 21 | 22 | .header .links a { 23 | display: inline-block; 24 | font-size: 1.2rem; 25 | font-weight: 500; 26 | border-radius: 4px; 27 | padding: 0.5rem 1.6rem; 28 | } 29 | -------------------------------------------------------------------------------- /website/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import useBaseUrl from "@docusaurus/useBaseUrl"; 3 | import Layout from "@theme/Layout"; 4 | import Translate, { translate } from '@docusaurus/Translate' 5 | 6 | import styles from "./index.module.css"; 7 | 8 | const Header = (): React.ReactElement => { 9 | return ( 10 |
11 | 12 |

13 | 14 | 开源在线评测系统 15 | 16 |

17 |