CodeX The Real Time Code Editor-1
CodeX The Real Time Code Editor-1
A PROJECT REPORT
Submitted by
MOULIESHWARAN D (22500251)
GURUDEV M (22500237)
DHARSHINI S (22500228)
Certified that this project report title “CODE X- REAL TIME CODE
EDITOR” is the bonafied work of MOULIESHWARN D (22500251),
GURUDEV M (22500237), AMALA PRAVIN SHAJU S (22590151),
DHARSHINI S (22500228) who carried out the work under my supervision.
Certified further that to the best of my knowledge the work reported herein does
not from part of any other project report.
SIGNATURE SIGNATURE
Mrs.G.Deepika , M.E., Mrs. D. JAMUNARANI , M.E.,
Project Supervisor Head of The Department
Department of Computer Engineering Department of Computer Engineering
Government Polytechnic College, Government Polytechnic College,
Coimbatore 641 014.
Coimbatore 641 014.
CODE X- REAL TIME CODE EDITOR
A PROJECT REPORT
Submitted by
MOULIESHWARAN D (22500251)
GURUDEV M (22500237)
DHARSHINI S (22500228)
The viva-voice examination of this project work has been done as a part of
i
ABSTRACT
A Code Editor is one of the tools that developers and programmers require
for developing these kinds of applications. The purpose of this code editor is to
design and develop a Real-time code editing web application to help users
implement code can directly complied and executed without the help of the
system-installed complier. This application provides a feature where users can
upload their own file from their system were no other online code editing
application has given this feature. Code X is a web application that provides
workspace to upload user’s own file, write, perform, display the result of the code
through terminal in real-time.
ii
TABLE OF CONTENTS
ACKNOWLEDGEMENT i
ABSTRACT ii
LIST OF FIGURES v
1 INTRODUCTION 1
EXISTING SYSTEM 3
3 PROBLEM STATEMENT 7
4 PROPOSED SYSTEM 9
5 SYSTEM SPECIFICATION 15
6 MODULE DESCRIPTION 17
6.1 Login 18
6.2 interface 18
6.4 compiler 19
6.6 logout 20
iii
7 SYSTEM IMPLEMENTATION 21
7.1 php 22
7.2HTML 23
7.3 CSS 24
7.4JavaScript 25
7.5 xampp 27
8 SYSTEM TESTING 28
9 CONCLUSION 33
10 REFERENCES 35
11 APPENDICES 37
11.2 Screenshot 44
iv
LIST OF FIGURES
v
INTRODUCTION
1
CHAPTER-1
INTRODUCTION
Online code editors have revolutionized the way users can write, test,
and collaborate on the code. They offer a flexible and accessible way to create and
experiment with code, directly in your web browser, without having to install any
software.
2
EXISTING SYSTEM
3
CHAPTER-2
EXISTING SYSTEM
Online code editors have revolutionized the way developers create,
collaborate on, and deploy software solutions. These web-based platforms offer a
comprehensive suite of tools tailored to various programming languages and
frameworks, empowering developers to write and test code directly in the browser.
With features like syntax highlighting, auto-completion, and live previews, online
code editors streamline the development process and foster productivity. Whether
for front-end web development, back-end scripting, or full-stack application
building, these platforms provide a flexible and accessible environment for coding
projects of all sizes. In this overview, will deliver into some of the prominent
features and examples of existing online code editors, showcasing their capabilities
and benefits to developers worldwide.
Cost: Many online editors offer free basic plans, but advanced features and
increased storage often require paid subscriptions. This can add up over time,
especially for professional use.
4
Learning curve: While some online editors are user-friendly, others have a
steeper learning curve, especially for those unfamiliar with web-based interfaces.
This can be an obstacle for beginners and slow down your workflow.
Local file importing: Local file importing in online code editors poses a drawback
of online code editor. It introduces compatibility challenges and complicates
workflows, potentially undermining the efficiency of project management.
[2] The ability to code directly in a browser without requiring local installations has
made web-based software development environments more and more popular.
Among the well-known platforms in this field, Visual Studio Code Online (VS
Code Online) is notable for offering a feature-rich coding environment that
includes debugging and syntax highlighting. GitHub Code spaces make it easier to
collaborate with version control in cloud-hosted development environments. Pre-
configured workspaces for a variety of projects are available through Gitpod, while
web development frameworks like React and Vue.js are supported by Code
Sandbox and Stack Blitz.
5
[3] There may not be a single authoritative source that is only focused on this
subject, but there are a number of publications and resources that provide insightful
information. Mistrik et al.'s book "Collaborative Software Engineering: Integrating
Theory and Practice" examines a number of topics related to collaborative software
development, such as team roles and cooperation strategies. Furthermore,
publications on agile methodologies—which frequently entail role-based
collaboration—such as Cohn's "Agile estimating and Planning" and Shore and
Warden's "The Art of Agile Development" delves into this subject. Gothelf and
Seiden's book "Lean UX: Designing Great Products with Agile Teams" explores
the relationship between UX design and agile approaches, placing a strong
emphasis on cross-functional cooperation. Online classes and scholarly research
publications offer many perspectives, yet
6
PROBLEM STATEMENT
7
CHAPTER-3
PROBLEM STATEMENT
Current online code editors often struggle with importing files, creating
a frustrating and inefficient experience for developers. Limited format support,
complex processes, and lack of information about import errors hinder productivity
and collaboration. This project seeks to address these issues by creating an online
code editor with broader file type compatibility, streamlined importing,
informative error handling, and complete functionality for imported files. This will
empower developers to work more efficiently, collaborate seamlessly, and
ultimately, unlock their full coding potential.
8
PROPOSED SYSTEM
9
CHAPTER-4
PROPOSED SYSTEM
Introducing a hybrid code editor system that combines the flexibility of
uploading files from a local system. By seamlessly integrating local file upload
functionality with advanced error-checking features, this proposed system
empowers developers to work efficiently and confidently.
ADVANTAGES
1. Local File Upload: Users can easily upload files from their PC directly into
the code editor environment. This feature ensures seamless integration with
existing workflows and enables developers to work on projects regardless of
internet availability.
10
4.1 SYSTEM ARCHITECTURE
LOGIN
UPLOAD
DISPLAY THE
FILE
OUTPUT COMPILER
RUN
11
USER
Visit codex
Return HTML UI
Navigate to login
Enter credentials
Send login request
Validate credentials
Authentication result
Upload file
Send upload request
12
Visit codeX
Render HTML UI
Validate user
authentication
Edit code
Compile code
Handle errors
13
4.2 SYSTEM DESCRIPTION
14
SYSTEM SPECIFICATION
15
CHAPTER-5
SYSTEM SPECIFICATION
5.1 HARDWARE SPECIFICATION
MONITOR : ACER
INTERNAL MEMORY CA : 4 GB
BACKEND : PHP
16
MODULE DESCRIPTION
17
CHAPTER-6
MODULES DESCRIPTION
1. Login
2. Interface
3. Code Area / Upload Button
4. Compiler
5. Output/Error Reporting
6. Logout
6.1. LOGIN
` Online code editors share common features like syntax highlighting for
code clarity and auto-completion for faster writing. Integration with Git simplifies
version control, while collaborative editing fosters teamwork. Live previews aid
iterative development, and debugging tools efficiently address coding issues. File
and project management features ensure organization, with the ability to
import/export files. Extensions and plugins allow customization for specific
languages or frameworks. Overall, these features make online code editors
versatile and efficient tools for various programming needs.
18
access various features, tools, and functionalities. The interface module also
incorporates intuitive controls, ensuring that users can efficiently manage their
tasks and customize their workspace according to their preferences.
19
and debug their code efficiently within the platform before deploying their
applications.
20
SYSTEM IMPLEMENTATION
21
CHAPTER-7
SYSTEM IMPLEMENTATION
7.1 PHP
One key advantage of PHP is its dynamic nature. It can interact with
databases, allowing websites to pull information, manage user accounts, and
display personalized content based on user preferences. This dynamic capability
empowers features like shopping carts, user forums, and content management
systems (CMS).
22
Despite its strengths, it's important to note that while PHP excels in web
development its security needs careful consideration. Developers must be mindful
of best practices to mitigate potential vulnerabilities.
Following the rigors of SGML, TBL bore HTML to the world in 1990.
Since then, many of us have it to be easy to use but sometimes quite limiting.
These limiting factors are being addressed but the World Wide Web Consortium
(aka W3c) at MIT. But HTML had to start somewhere, and its success argues that
it didn’t start out too badly.
23
relatively easy to learn, with the basics being accessible to most people in one
sitting; and quite powerful in what it allows you to create. It is constantly
undergoing revision and evolution to meet the demands and requirements of the
growing Internet audience under the direction of the W3C, the organisation
charged with designing and maintaining the language.
HTML consists of a series of short codes typed into a text-file by the site
author — these are the tags. The text is then saved as a html file, and viewed
through a browser, like Internet Explorer or Netscape Navigator. This browser
reads the file and translates the text into a visible form, hopefully rendering the
page as the author had intended. Writing your own HTML entails using tags
correctly to create your vision. You can use anything from a rudimentary text-
editor to a powerful graphical editor to create HTML pages.
Cascading Style Sheets (CSS) is a style sheet language used for describing
the presentation of a document written in a markup language like HTML. CSS is a
cornerstone technology of the World Wide Web, alongside HTML and JavaScript.
CSS is designed to enable the separation of presentation and content, including
layout, colours, and fonts. This separation can improve content accessibility,
24
provide more flexibility and control in the specification of presentation
characteristics, enable multiple web pages to share formatting by specifying the
relevant CSS in a separate.css file, and reduce complexity and repetition in the
structural content.
7.4 JAVASCRIPT
25
capabilities. JavaScript was first known as LiveScript, but Netscape changed its
name to JavaScript, possibly because of the excitement being generated by Java.
JavaScript made its first appearance in Netscape 2.0 in 1995 with the name
LiveScript. The general-purpose core of the language has been embedded in
Netscape, Internet Explorer, and other web browsers.
You can place the <script> tags, containing your JavaScript, anywhere within
your web page, but it is normally recommended that you should keep it within the
<head> tags.
26
7.5 XAMPP
27
SYSTEM TESTING
28
CHAPTER-8
SYSTEM TESTING
It is the process of exercising software with the intent of finding and
ultimately correcting errors. This fundamental philosophy does not change for web
applications, because web based system and applications reside on network and
inter-operate with many different operating systems, browsers, hardware platforms
and communication protocols .Thus searching for errors is a significant challenge
for web applications.
29
The four categories of test that a programmer will typically perform on a
program unit
1. Functional test
2. Performance test
3. Stress Test
4. Structure test
Functional test involves exercising the code with nominal input values
for which the expected results are known as well as boundary values and special
values.
30
8.2 INTEGRATION TESTING
31
Asking the user about the format required by them tests the output
generated by the system under consideration. It can be done in two ways, one on
screen and other on printer format. The output format on the screen is found to be
correct as the format designed n system test.
32
CONCLUSION
33
CHAPTER-9
CONCLUSION
This project tackles the challenge of limited file import in online code
editors. By offering a robust and user-friendly import system, it empowers
developers with several benefits. The streamlined process and full functionality for
imported files lead to increased productivity and a smoother user experience.
Additionally, the ability to easily import and manage various file types fosters
improved collaboration on diverse projects. This online code editor goes beyond
existing platforms, creating a more efficient, user-centric, and collaborative
development environment for programmers of all levels, ultimately empowering
them to unleash their full coding potential.
34
REFERENCES
35
CHAPTER-10
REFERENCES
REFERENCE
36
APPENDICES
37
CHAPTER-11
APPENDICES
11.1 SAMPLE CODE
Ide.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Code-X</title>
<style>
.upload-form {
.file-input {
.upload-label {
38
font-size: 16px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
display: inline-block;
.upload-label:hover {
background-color: #0056b3;
</style>
</head>
<body>
<div class="control-panel">
Select Language:
39
<option value="php"> PHP </option>
</select>
</div>
</div>
<div class="button-container">
</div>
<div class="output"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="js/lib/ace.js"></script>
<script src="js/lib/theme-monokai.js"></script>
40
<script src="js/ide.js"></script>
<script>
function readFile() {
reader.onload = function(event) {
// Set the content of the editor to the content of the uploaded file
editor.setValue(fileContent);
};
reader.readAsText(file);
</script>
</body>
</html>
41
COMPILER.PHP
<?php
$language = strtolower($_POST['language']);
$code = $_POST['code'];
fwrite($programFile, $code);
fclose($programFile);
if($language == "php") {
echo $output;
if($language == "python") {
$output =
shell_exec("C:\Users\Admin\AppData\Local\Programs\Python\Python310\pythonw.exe
$filePath 2>&1");
echo $output;
if($language == "node") {
rename($filePath, $filePath.".js");
42
$output = shell_exec("node $filePath.js 2>&1");
echo $output;
if($language == "c") {
echo $output;
if($language == "cpp") {
echo $output;
43
11.2 SCREESHORTS
Figure 11.2.1
Figure 11.2.2
44
Figure 11.2.3
Figure 11.2.4
45
Figure 11.2.5
46